在 Postgres 11 中的分区表上设置 autovacuum
Setting autovacuum on partitioned tables in Postgres 11
我正在尝试在 PostgreSQL 11 上调整分区 table 上的 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"
是否可以在分区 table 上更改此类设置?
您似乎只能在 table 分区而不是父 table 分区上设置参数。
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=#
我正在尝试在 PostgreSQL 11 上调整分区 table 上的 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"
是否可以在分区 table 上更改此类设置?
您似乎只能在 table 分区而不是父 table 分区上设置参数。
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=#