2016-07-25 38 views
0

我在Postgres服务器中检查了表。运行autovacuum运行的reloptions中的默认值是什么

SELECT reloptions 
FROM pg_class 
WHERE relname = 'log_xxx_table'; 

我猜返回的数据是"autovacuum_enabled = true",但返回的数据是null

此表有真空日志跑自动清理。

默认reloptions为null,但autovacuum_enabled = true?

+0

你的问题到底是什么? –

回答

1

默认值reloptions为空,表示可配置选项设置为其默认值。默认值autovacuum_enabledtrue。你可以像这样设置它:

create table a_table(id int) 
with (autovacuum_enabled = false); 

select relname, reloptions 
from pg_class 
where relname = 'a_table'; 

relname |   reloptions   
---------+---------------------------- 
a_table | {autovacuum_enabled=false} 
(1 row) 
+0

谢谢你的回答 –