Questions tagged [vacuum]

In SQLite and PosgreSQL, the VACUUM command rebuilds the entire database.

232 questions
1
vote
1 answer

Setting autovacuum on partitioned tables in Postgres 11

I'm trying to adjust autovacuum settings on a partitioned table, on PostgreSQL 11. e.g: # create table test (ts timestamp) partition by range (ts); CREATE TABLE # alter table test set (autovacuum_analyze_scale_factor = 0.1); ERROR: unrecognized…
Sylvain
  • 3,202
  • 5
  • 27
  • 27
1
vote
2 answers

Long running function locking the database?

Is it normal for a function to acquire a database-level lock that prevents auto vacuuming and index creation on totally unrelated tables? I've got a long-running stored procedure that reads from one table and writes SUM()/AVG() data to another…
KenHuffman
  • 106
  • 1
  • 4
1
vote
1 answer

Dynamic data in postgresql

I intend to have a python script do many UPDATEs per second on 2,433,000 rows. I am currently trying to keep the dynamic column in python as a value in a python dict. Yet to keep my python dict synchronized with changes in the other columns is…
Nicholas Leonard
  • 2,566
  • 4
  • 28
  • 32
1
vote
1 answer

Is it ok to run vacuum full verbose command for live database for the tables which has more dead tuples?

We have thousands of tables. But out of those tables, around 20 to 40 tables are always busy due to that those tables are bloating. In order to avoid this we are running a shell script which performs vacuum full on the tables which has more than ten…
Raghavendra
  • 519
  • 1
  • 11
  • 25
1
vote
0 answers

duplicate key value violates unique constraint "pg_statistic_relid_att_inh_index" while performing full vacuum on the database

While performing vacuum full, I have received the below highlighted error. Please guide me how to resolve this issue. ​/opt/postgres/9.2/bin/psql -p 5433 --username=cmuser cpcm -c "VACUUM FULL ANALYZE;" ERROR: duplicate key value violates…
Raghavendra
  • 519
  • 1
  • 11
  • 25
1
vote
1 answer

Execute vacuum online

I'm new with PostgreSQL, so I hope that this is question is ok. If I want to execute a vacuum operation (manual or auto). Is that operation can make problems to end-users or anything with queries or other DML commands? I'm using version 9.6
user2671057
  • 1,411
  • 2
  • 25
  • 43
1
vote
3 answers

How to get the sum of FreeSpace of all the tables in a database

To Get all the user Table names in the database using: select relname from pg_stat_user_tables; relname ------- Table1 Table2 Table3 To Get the free space marked by vacuum of one table using: SELECT sum(avail) FROM…
Anushiya
  • 25
  • 9
1
vote
1 answer

Free memory after Vacuum full?

I am running out of disk space on my database server. I have never executed a vacuum full and I'm hoping that vacuum full will free some space. Have you run vacuum full before, and if space was freed up, how much was it?
1
vote
1 answer

pg_toast table not reduced in size after autovacuum

I'm on Postgresql 9.3. I have a monstrous pg_toast table, pg_toast_675632, taking up 27 GB. Unless I am misunderstanding, this pg_toast_675632 is so large because I had a large json column in the data table that the pg_toast_675632 is related to,…
BigRon
  • 3,182
  • 3
  • 22
  • 47
1
vote
1 answer

Shouldn't i run vacuum analyze together? Should i run vacuum and analyze separately? Assuming large delete and updates are done

Assuming large delete and updates are done on a GP table. Shouldn't i run vacuum analyze together? Should i run vacuum and analyze separately?. The GP best practice document says "Do not run vacuum…
1
vote
2 answers

Vaccuming Redshift interleaved sort keys

I have a couple of tables I have added interleaved sort keys to and used the copy command to bulk load a lot of data into. The documentation states we need to use the Reindex option with Vacuum for interleaved sort keys. Trouble with this is for a…
godzilla
  • 3,005
  • 7
  • 44
  • 60
1
vote
0 answers

Replication on the postgres DB breaks when VACUUM job runs

We have PostgreSQL 9.1.3 running on (SUSE Linux) 4.3.4 - 64 bit. There is a master slave set up and a streaming replication has been set up between the two. We have a cron job set up which runs the VACUUM command on the master database every Friday.…
1
vote
1 answer

Fetch RelatedItems in Amazon Product Api using Rails 4 Vacuum gem

I am integrating Amazon Product Api in my rails app. The only thing remaining now is fetching related items list when I am performing the item_lookup operation. When I add RelatedItems in ResponseGroup like this: response =…
1
vote
1 answer

fetch ItemId in Amazon Product Api using Rails Vacuum gem

I am integrating Amazon Product Api in my rails app. I am using the vacuum gem for this integration. There are two main pages. I am fetching the products through this code. requestd = Vacuum.new requestd.configure( aws_access_key_id:…
1
vote
1 answer

Slow performance with small table after extreme reduction of size

I have table with approximately 10 million rows, with the id column being primary key. Then I delete all rows where id > 10. Only 10 rows remain in the table. Now, when I run the query SELECT id FROM tablename, execution time is approximately 1.2 -…
Oto Shavadze
  • 40,603
  • 55
  • 152
  • 236