8000 Fix incorrect xid and timestamp for continued txn COMMIT SQL. by shubhamdhama · Pull Request #302 · dimitri/pgcopydb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix incorrect xid and timestamp for continued txn COMMIT SQL. #302

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

Merged
merged 2 commits into from
May 30, 2023

Conversation

shubhamdhama
Copy link
Contributor

This fixes the missing xid and timestamp for continued transactions,

COMMIT; -- {"xid":0,"lsn":"6/A50001C8","timestamp":""}

This timestamp is used in pgsql_replication_origin_xact_setup which we
update along with COMMIT; statement. So it makes more sense to put
COMMIT's timestamp as origin timestamp.

Retaining the current update with BEGIN action as well. This avoids
timestamp being empty for BEGIN SQL statement in the file when COMMIT
spills to next SQL file.

shubhamdhama and others added 2 commits May 30, 2023 16:32
This fixes the missing `xid` and `timestamp` for continued transactions,
```sql
COMMIT; -- {"xid":0,"lsn":"6/A50001C8","timestamp":""}
```

This timestamp is used in `pgsql_replication_origin_xact_setup` which we
update along with `COMMIT;` statement. So it makes more sense to put
COMMIT's `timestamp` as origin timestamp.

Retaining the current update with `BEGIN` action as well. This avoids
`timestamp` being empty for `BEGIN` SQL statement in the file when COMMIT
spills to next SQL file.
@dimitri dimitri merged commit 6fc44e6 into dimitri:main May 30, 2023
@shubhamdhama shubhamdhama deleted the fix-missing-timestamp-and-xid branch June 5, 2023 09:01
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
0