Conversation
added 2 commits
August 29, 2026 14:56
Three fixes for TOASTed jsonb values arriving as null in wal_level=logical physical-slot CDC: 1. HeapTupleDecoder: compressed TOAST values stored in the toast relation begin with the 4-byte va_tcinfo word (raw size) before the pglz stream; skip it before inflating, mirroring the inline 4B-header branch. 2. PhysicalWalLogMiner.fetchToastValue: the TOAST pointer stores the toast table's own OID, which can differ from the owning table's OID after a rebuild, so resolve the real relation name via pg_class instead of string-concatenating pg_toast_<oid>. Also surface diagnostics on failure. 3. PhysicalWalLogMiner: LOGICAL_FAST_DECODE_CTX was a static context without the instance toastFetcher, so wal_level=logical fast pre-decode resolved TOAST pointers to null. Made it an instance field initialized alongside decodeCtx with the toast fetcher wired in. Tests: HeapTupleDecoderTest now feeds real-format (va_tcinfo + pglz) data; HeapTupleDecoderTest/HeapRmgrDecoderTest/PglzTest all green, PhysicalWalLogMinerTest 82/82.
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.
No description provided.