PG19: report explicit unsupported ALTER CONSTRAINT errors
Author: ihalatciCreated Aug 12, 2026Updated Sep 28, 2026
Labelspg19_features
Beta 4 scope
PostgreSQL 19 Beta 4 reverted ALTER TABLE ... MERGE PARTITIONS and SPLIT PARTITION. Those operations are no longer part of this issue.
PostgreSQL 19 still supports constraint enforceability through ALTER TABLE ... ALTER CONSTRAINT, represented by AT_AlterConstraint and conenforced. Citus currently rejects this safely through the generic unsupported-command fallback, but the message does not identify the operation or explain that the property change is not propagated to shards.
Proposed minimum change
- Add an explicit
AT_AlterConstraintFEATURE_NOT_SUPPORTEDerror for distributed, reference, and Citus-local tables. - State that Citus does not propagate constraint property changes to shards.
- Preserve ordinary PostgreSQL local-table behavior.
- Do not add cases for the reverted partition merge/split subcommands.
- Do not bundle unrelated DETACH PARTITION error-code changes unless independently justified.
Acceptance criteria
- PostgreSQL 19 local CHECK constraint
ALTER CONSTRAINT ... [NOT] ENFORCEDbehavior remains unchanged. - Distributed, reference, and Citus-local forms fail before propagation with a stable operation-specific error.
- Coordinator and shard
conenforcedstate remains unchanged after rejection. - Existing PG17/18
ALTER CONSTRAINTrejection behavior remains compatible. - Focused PG19 Beta 4 and cross-version regression coverage passes.
Implementation
Draft PR #8808 is the current candidate. It must be rebased onto current main and trimmed to this scope before review.
Source: citusdata/citus