【问题标题】:Setting autovacuum on partitioned tables in Postgres 11在 Postgres 11 中的分区表上设置 autovacuum
【发布时间】:2019-05-27 14:07:55
【问题描述】:

我正在尝试在 PostgreSQL 11 上调整分区表上的 autovacuum 设置。

例如:

# create table test (ts timestamp) partition by range (ts);
CREATE TABLE
# alter table test set (autovacuum_analyze_scale_factor = 0.1);
ERROR:  unrecognized parameter "autovacuum_analyze_scale_factor"

是否可以更改分区表上的此类设置?

【问题讨论】:

    标签: postgresql partition vacuum autovacuum postgresql-11


    【解决方案1】:

    好像只能在表分区上设置参数,不能在父表上设置参数。

    postgres=# create table test (ts timestamp) partition by range (ts);
    CREATE TABLE
    postgres=# create table test_2018 partition of test for values from ('2018-01-01 00:00:00') to ('2018-12-31 23:59:59');
    CREATE TABLE
    postgres=# alter table test_2018 set (autovacuum_analyze_scale_factor = 0.1);
    ALTER TABLE
    postgres=# alter table test set (autovacuum_analyze_scale_factor = 0.1);
    ERROR:  unrecognized parameter "autovacuum_analyze_scale_factor"
    postgres=# 
    

    【讨论】:

      猜你喜欢
      • 2020-01-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多