fix(statistics): убрать параметры хранения с родительских партиций
Docker images / prepare-release (push) Successful in 9s
Docker images / backend-test (push) Successful in 2m25s
Docker images / frontend-image (push) Successful in 3m26s
Docker images / updater-image (push) Successful in 45s
Docker images / backend-image (push) Successful in 2m32s
Docker images / notify-webhook (push) Skipped
Docker images / publish-release (push) Successful in 13s
Docker images / prepare-release (push) Successful in 9s
Docker images / backend-test (push) Successful in 2m25s
Docker images / frontend-image (push) Successful in 3m26s
Docker images / updater-image (push) Successful in 45s
Docker images / backend-image (push) Successful in 2m32s
Docker images / notify-webhook (push) Skipped
Docker images / publish-release (push) Successful in 13s
PostgreSQL 42809: FILLFACTOR и autovacuum нельзя задавать на partitioned parent — только на листьях. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
-- Statistics cube: hour + daily facts (server × iface × country × service × ASN).
|
||||
-- Compact types, fillfactor for HOT upserts, autovacuum tuned for ON CONFLICT.
|
||||
-- Compact types. FILLFACTOR/autovacuum нельзя на partitioned parent (PG 42809) —
|
||||
-- задаются на листовых партициях в ensurePartitionFor.
|
||||
-- Retention: DROP partitions only (see PARTITION_SPECS).
|
||||
|
||||
CREATE TABLE IF NOT EXISTS flow_hour_facts (
|
||||
@@ -14,12 +15,6 @@ CREATE TABLE IF NOT EXISTS flow_hour_facts (
|
||||
PRIMARY KEY (server_id, bucket_at, iface, country, service, asn)
|
||||
) PARTITION BY RANGE (bucket_at);
|
||||
|
||||
ALTER TABLE flow_hour_facts SET (
|
||||
fillfactor = 70,
|
||||
autovacuum_vacuum_scale_factor = 0.05,
|
||||
autovacuum_vacuum_cost_limit = 2000
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS flow_daily_facts (
|
||||
server_id BIGINT NOT NULL REFERENCES servers(id) ON DELETE CASCADE,
|
||||
day DATE NOT NULL,
|
||||
@@ -31,9 +26,3 @@ CREATE TABLE IF NOT EXISTS flow_daily_facts (
|
||||
packets BIGINT NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (server_id, day, iface, country, service, asn)
|
||||
) PARTITION BY RANGE (day);
|
||||
|
||||
ALTER TABLE flow_daily_facts SET (
|
||||
fillfactor = 70,
|
||||
autovacuum_vacuum_scale_factor = 0.05,
|
||||
autovacuum_vacuum_cost_limit = 2000
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user