Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct DELETED tuple reference pg_decode_change_v1 #252

Merged
merged 1 commit into from
Jun 6, 2023

Conversation

robert-pang
Copy link
Contributor

When I build and run wal2json's regression tests, test "pk" fails and the Postgres backend process crashes with this error:

2022-09-21 18:05:54.488 PDT [4251] LOG:  server process (PID 4378) was terminated by signal 4: Illeg
al instruction
2022-09-21 18:05:54.488 PDT [4251] DETAIL:  Failed process was running: SELECT data FROM pg_logical_
slot_peek_changes('regression_slot', NULL, NULL, 'format-version', '1', 'pretty-print', '1', 'includ
e-typmod', '0', 'include-pk', '1');

Upon some debugging, I notice that wal2json references newtuple under the REORDER_BUFFER_CHANGE_DELETE case in pg_decode_change_v1() when calling pk_to_stringinfo() but it seems like we should use the old tuple. If I replace it with oldtuple, the test passes.

Can we confirm if we should pass oldtuple to pk_to_stringinfo()?

@robert-pang
Copy link
Contributor Author

Any comment if the proposed change is valid?

@eulerto eulerto merged commit 703a769 into eulerto:master Jun 6, 2023
@robert-pang
Copy link
Contributor Author

Thank you for reviewing this PR and merging it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants