#8758·citus

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_AlterConstraint FEATURE_NOT_SUPPORTED error 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] ENFORCED behavior remains unchanged.
  • Distributed, reference, and Citus-local forms fail before propagation with a stable operation-specific error.
  • Coordinator and shard conenforced state remains unchanged after rejection.
  • Existing PG17/18 ALTER CONSTRAINT rejection 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.