2016-07-25 67 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

謝謝你的回答 –