postgresql 如何重置表的存储参数

p3rjfoxz  于 2023-06-22  发布在  PostgreSQL
关注(0)|答案(1)|浏览(123)

我有以下表格的设置。我希望表使用SYSTEM / Server级自动真空设置,而不是使用表级设置。这可能吗?

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

6fe3ivhb1#

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

alter table test reset (autovacuum_analyze_scale_factor, autovacuum_analyze_threshold)

相关问题