【问题标题】:what is the default value in reloptions that ran autovacuum is running运行 autovacuum 的 reloptions 中的默认值是什么?
【发布时间】:2016-07-25 13:28:12
【问题描述】:

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

SELECT reloptions
FROM pg_class
WHERE relname = 'log_xxx_table';

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

此表已自动运行真空日志。

默认 reloptions 为 null 但 autovacuum_enabled = true?

【问题讨论】:

  • 你的问题到底是什么?

标签: postgresql autovacuum


【解决方案1】:

reloptions 的默认值为 null,这意味着可配置选项设置为其默认值。 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)

【讨论】:

    猜你喜欢
    • 2018-06-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-17
    • 2011-08-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多