Dhirendra Patil
Dhirendra Patil

Reputation: 132

How to reset storage parameters of a table

I have below settings for the table. Instead of using table level setting, I want the table to use SYSTEM / Server level autovacuum settings. Is that possible?

# select pg_options_to_table(reloptions) from pg_class where relname='test' ;
          pg_options_to_table
----------------------------------------
 (autovacuum_analyze_scale_factor,0)
 (autovacuum_analyze_threshold,1000000)
 (autovacuum_vacuum_cost_delay,0)
 (autovacuum_vacuum_scale_factor,0)
 (autovacuum_vacuum_threshold,1000000)
 (autovacuum_enabled,true)

Basically it should look like below

 select pg_options_to_table(reloptions) from pg_class where relname='test' ;
 pg_options_to_table
---------------------
(0 rows)


Upvotes: 9

Views: 2526

Answers (1)

klin
klin

Reputation: 121604

The column reloptions of pg_class contains storage parameters. You can set or reset these parameters using alter table, .e.g:

alter table test reset (autovacuum_analyze_scale_factor, autovacuum_analyze_threshold)

Upvotes: 12

Related Questions