0

我已经检查了 Postgres 服务器中的表格。

SELECT reloptions
FROM pg_class
WHERE relname = 'log_xxx_table';

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

此表有真空日志运行 autovacuum。

默认 reloptions 为 null 但 autovacuum_enabled = true?

4

1 回答 1

2

的默认值为reloptionsnull,这意味着可配置选项设置为其默认值。autovacuum_enabled的默认值为true。您可以像在示例中一样设置它:

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)
于 2016-07-25T14:45:15.407 回答