PostgreSQL 18.6 on aarch64-unknown-linux-gnu, compiled by gcc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-11), 64-bit == 1. One row dated in a month that does not exist yet row dated 2026-05-17 is stored in: payments_default == 2. The job that creates every table and month together SQLSTATE 23514: updated partition constraint for default partition "payments_default" would be violated by some row payments partitions: ['default'] audit_log partitions: ['default'] == 3. With no months, every new row goes to the default partitions payments_default holds 7 rows audit_log_default holds 6 rows == 4. The same job, each month in its own subtransaction WARNING: payments 2026-05 not created: updated partition constraint for default partition "payments_default" would be violated by some row payments partitions: ['2026_01', '2026_02', '2026_03', '2026_04', '2026_06', 'default'] audit_log partitions: ['2026_01', '2026_02', '2026_03', '2026_04', '2026_05', '2026_06', 'default'] == 5. Repair: move the row and create its month in one transaction row dated 2026-05-17 is stored in: payments_2026_05 payments partitions: ['2026_01', '2026_02', '2026_03', '2026_04', '2026_05', '2026_06', 'default'] == 6. Creating one month, by how many rows the default partition holds rows in default default size create, median ms min max 0 0 bytes 0.5 0.5 0.6 10,000 912 kB 0.9 0.9 1.1 100,000 9096 kB 4.2 4.2 4.4 1,000,000 89 MB 35.9 35.6 36.2 2,000,000 178 MB 74.4 73.6 75.1 == 7. Locks held while creating a month (2,000,000 rows in the default) CREATE TABLE ... PARTITION OF payments AccessExclusiveLock payments_default AccessExclusiveLock ATTACH PARTITION payments AccessShareLock payments ShareUpdateExclusiveLock payments_default AccessExclusiveLock == 8. A check constraint on the default partition that excludes the new month create, median ms: 0.6 (min 0.5, max 0.9) insert dated 2026-05-17: SQLSTATE 23514: new row for relation "payments_default" violates check constraint "history_only" == 9. What other sessions wait for meanwhile (2,000,000 rows in the default) slowest statement, ms idle PARTITION OF ATTACH insert into the current month 0.7 81.7 0.7 read of the current month 0.8 81.7 2.8 read across all months 35.2 108.1 107.6