refactor: use pglogrepl's message parser for WAL parsing#15
Merged
refactor: use pglogrepl's message parser for WAL parsing#15
Conversation
The merge-base changed after approval.
367a85b to
27a25b8
Compare
27a25b8 to
cdb62dd
Compare
cdb62dd to
85c94ef
Compare
85c94ef to
5546e28
Compare
5546e28 to
a1f2f3d
Compare
Replace custom BinaryParser with pglogrepl.Parse() for consistency with the upstream library and improved maintainability. Changes: - Replace BinaryParser with Parser using pglogrepl.Parse() - Update WAL struct to use pglogrepl.LSN and uint32 for relationID - Update CreateActionData to accept *pglogrepl.TupleData - Remove custom message types from protocol.go (now uses pglogrepl types) - Rewrite parser tests for new implementation - Update wal tests for new types - Fix main.go to use NewParser() instead of NewBinaryParser() - Fix NatsCredPath validation (not required for all publisher types) - Fix config test expectations for lowercase field names - Fix nats_test.go subject name expectation - Update copilot-instructions.md to document pglogrepl usage Signed-off-by: Tamal Saha <tamal@appscode.com>
a1f2f3d to
9b9dc4f
Compare
Signed-off-by: Imtiaz Uddin <imtiaz@appscode.com>
Imtiaz246
approved these changes
Jan 15, 2026
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.
Summary
Replace custom
BinaryParserwithpglogrepl.Parse()for consistency with the upstream library and improved maintainability.Changes
Core Refactoring
BinaryParserwithParserusingpglogrepl.Parse()WALstruct to usepglogrepl.LSNanduint32for relationIDCreateActionData()to accept*pglogrepl.TupleDatainstead of[]TupleDataNewParser()instead ofNewBinaryParser()Test Updates
pglogrepl.LSN,uint32,*pglogrepl.TupleData)Bug Fixes
valid:"required"fromNatsCredPath(only needed for NATS publisher)Documentation
Benefits