Home > Mobile >  How to revert the auto-vacuum settings for a table in postgresql?
How to revert the auto-vacuum settings for a table in postgresql?

Time:01-16

I can update the autovacuum settings for a table using ALTER TABLE commands as follows:

ALTER TABLE <MY_TABLE_NAME> SET (autovacuum_vacuum_scale_factor = 0.02);

But am not able to figure out (was not able to find in the docs) how these settings can be reverted (if need be), thereby making the table to utilize the global autovacuum setttings?

The configurations are visible in the pg_class catalogue using

SELECT reloptions FROM pg_class WHERE relname='<MY_TABLE_NAME>'

CodePudding user response:

To reset a changed setting is just ALTER TABLE ... RESET (<setting>). The bit that can be confusing is that the parentheses are required.

  • Related