如何重置表的存储参数

时间:2019-01-18 03:26:24

标签: postgresql

我对表格进行了以下设置。我希望表不使用表级别设置,而是使用系统/服务器级别的自动清理设置。有可能吗?

# 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)

基本上应该如下图

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


1 个答案:

答案 0 :(得分:1)

reloptions of pg_class包含storage parameters。您可以使用alter table设置或重置这些参数,例如:

alter table test reset (autovacuum_analyze_scale_factor, autovacuum_analyze_threshold)