PostgreSQL publication columns shifted: reconcile the interval before restart
A restart can refresh Relation metadata without correcting rows decoded earlier.
The interval left behind by a disappearing symptom
A restart can remove the symptom without establishing that values were placed correctly between snapshot startup and restart. Compare the publication column order in Relation with the order used after refresh. A correctly formatted timestamp may still belong to another field; the reconciliation supplied to Truthound must retain tuple positions and source-field identity. [1, 2, 3]
The session condition that narrowed the report
Debezium PostgreSQL #2952 reports tuple positions being interpreted against the full table after an incremental-snapshot schema refresh with a publication column list. A later comment narrows reproduction to a session that had already received Relation. A first snapshot in a fresh session is a different control. The restart effect is reported evidence, not a connector run performed for this article. [1]
A small test with three stages
Receive Relation through an initial INSERT, run the snapshot, then issue another INSERT. Hold publication and excluded-column settings constant, retaining Relation, refresh and tuple observations from the same session. Stop publication of the interval whose field mapping disagrees with the source. Do not omit earlier rows simply because new rows look correct after restart. [1, 3]
Who owns the third value?
In the illustrative publication order id,a,created_at, the base table also contains an intervening excluded_flag. The third tuple value therefore belongs to created_at. A decoder mapping it to created_at meets the positional condition; mapping it to excluded_flag fails even if its value passes a format check. This defines a logical contract, not a PostgreSQL execution result. [1, 3]
Check field correspondence before type
Truthound Core Python SDK 3.3.2 can compare prepared publication_column_name and decoder_column_name using ColumnPairValidator with relationship="==". The operator decodes tuple positions into non-missing field names and isolates unknown mappings separately. The SDK does not refresh pgoutput sessions or replay historical rows. [1, 2, 3]
Separate restart from recovery
Restarting the connector can obtain current Relation metadata, but recovery also requires reconciling earlier values by source key and field. A session without a pre-snapshot Relation is outside the narrowed reproduction condition. Verify the exact version carrying any upstream change rather than treating a successful restart as evidence of a shipped repair. [1, 3]
Application conditions
Bind publication column lists, Relation and refresh observations to the same session, preserving field-exclusion settings.
Alternatives
After restart, reconcile the affected interval with source data and test a verified upstream correction.
Limitations
Truthound does not refresh pgoutput state or automatically replay the affected interval; distinguish suspected causes from narrowed reproduction conditions.
Evidence
- Event checked
- Subject checked
- Modified
