feat(database): capture live updates via Postgres pgoutput - #1609
Merged
Merged
Conversation
Replace the SQL changelog/trigger queue with in-process WAL CDC. Live updates are Postgres-only (temporary pgoutput slot, no catch-up); MySQL/MariaDB/SQLite capture is out of v1.
Drop unused decoder/helpers, tautological test branches, and a passthrough wrapper versus feat/database-realtime-sql.
Topology checks used a temporary pgoutput slot on every reconcile, which could fail-close a live leader feed. Probe settings only; create the slot in feed.start() and retry as degraded. Consume binary/TOAST tuple kinds, catch CopyData decode errors, and stay starting until the watch is ready.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
_cnd_DatabaseChangequeue is removed (leftover objects are dropped on reconcile). There is no catch-up / resume token; leader restart or slot drop skips missed events and clients refetch.Intervention into #1602 (
feat/database-realtime-sql). Does not restack onto #1601. Does not force-pushfeat/database-realtime-sql.What changed
pgoutputpublicationcnd_realtime+ a temporary replication slot.wal_level=logical,max_replication_slots/max_wal_senders> 0). It does not create a probe slot (that competed with the leader’s live slot and fail-closed the feed). Slot create belongs infeed.start(); failure is degraded + retry, not sticky unsupported topology.LISTEN/NOTIFYis not the capture path. No changelog table, no triggers, no Debezium.persistResume: false). Event payloads may still include an LSN-shapedresumeTokenfield; it is not a catch-up cursor.startinguntil the watch’s replication feed is ready. CopyData decode is try/caught; pgoutput tuples consume'u'/'b'so later text ids stay aligned.Tests
SQL_LOGICAL_URI).5a216ebe.