Questions tagged [vacuum]

The vacuum command in postgres releases unused space. Be sure to also include the [postgres] tag, and version tag such as [postgresql-9.6]. Include an operating system tag,

Filter by
Sorted by
Tagged with
2 votes
1 answer

Is PostgreSQL 9.2 autovacuum sufficient for a busy table?

I have one table on a PostgreSQL 9.2/PostGIS 2.0.1 database: CREATE TABLE ch02.markers ( ff_id SERIAL PRIMARY KEY, col1 boolean, col2 smallint, created_at timestamp, lat double precision, ...
user avatar
49 votes
5 answers

Aggressive Autovacuum on PostgreSQL

I'm trying to get PostgreSQL to aggressively auto vacuum my database. I've currently configured auto vacuum as follows: autovacuum_vacuum_cost_delay = 0 #Turn off cost based vacuum ...
CadentOrange's user avatar
1 vote
1 answer

PostgreSQL vacuum duration on a big table

I have a very big table in my postgreSQL (over 300 million rows) that has never been vacuumed. Yesterday I tried a vacuum and analyze (not a full one) and it took about 7 hours to complete. Will it ...
user avatar
39 votes
3 answers

Are regular VACUUM ANALYZE still recommended under 9.1?

I'm using PostgreSQL 9.1 on Ubuntu. Are scheduled VACUUM ANALYZE still recommended, or is autovacuum enough to take care of all needs? If the answer is "it depends", then: I have a largish database (...
François Beausoleil's user avatar
1 vote
1 answer

Partial vacuum and whole table vacuum

From postgresql document, I know vacuum can skip pages that are already marked in visibility map, so vacuum progress only vacuum pages which requires vacuum,and we call this partival vacuum; ...
francs's user avatar
  • 1,427
1 vote
1 answer

How to know there is a maintenance job running on a postgresql database

I have a python script on postgresql database which is fetching records from sql server database and inserting it to postgresql DB after some filtering. this jobs is running by cron every two minutes. ...
Majid Azimi's user avatar
  • 2,201
46 votes
6 answers

I need to run VACUUM FULL with no available disk space

I have one table that is taking up close to 90% of hd space on our server. I have decided to drop a few columns to free up space. But I need to return the space to the OS. The problem, though, is ...
Justin Rhyne's user avatar
4 votes
1 answer

Dropping indexes doesn't seem to release space to the OS. Can it?

I'm running PostgreSQL 9.1. I have noticed really alarmingly bad indexes are taking up a lot of space on my server, e.g: evlampts=# SELECT pg_size_pretty(pg_relation_size('mcdata_2011_07')) AS ...
Daniel Lyons's user avatar
3 votes
2 answers

pg_relation_size does not show any difference after VACUUM ANALYZE

I wrote a script to backup a postgresql using COPY and then delete those records. I have used pg_relation_size before and after delete. pg_relation_size DELETE VACUUM ANALYZE pg_relation_size But ...
Majid Azimi's user avatar
  • 2,201
13 votes
1 answer

Disk file effects of delete and vacuum

I have a very frequently updated table with 240 million rows (and growing). Every three hours 1.5 million rows are inserted and 1.5 million are deleted. When I moved the cluster to a SSD this bulk ...
Clodoaldo's user avatar
  • 1,135
5 votes
2 answers

PostgreSQL unexplained table bloat

I have a table in a Postgres 8.2.15 database. The table bloated to almost 25GB but after running vacuum full and cluster the table size was dramatically smaller, well under 1GB. A few weeks later ...
yohaas's user avatar
  • 121

1 2 3