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

Include the ability to catch sync messages in order to #29

Open
github-actions bot opened this issue Oct 25, 2022 · 0 comments
Open

Include the ability to catch sync messages in order to #29

github-actions bot opened this issue Oct 25, 2022 · 0 comments

Comments

@github-actions
Copy link

close the current transaction.

At completion of each series of extended-query messages, the frontend
should issue a Sync message. This parameterless message causes the
backend to close the current transaction if it's not inside a
BEGIN/COMMIT transaction block (“close” meaning to commit if no
error, or roll back if error). Then a ReadyForQuery response is
issued. The purpose of Sync is to provide a resynchronization point
for error recovery. When an error is detected while processing any
extended-query message, the backend issues ErrorResponse, then reads
and discards messages until a Sync is reached, then issues
ReadyForQuery and returns to normal message processing. (But note
that no skipping occurs if an error is detected while processing Sync
— this ensures that there is one and only one ReadyForQuery sent for
each Sync.)
https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY

Line: 117

psql-wire//command.go

Lines 114 to 124 in 3dbc832

switch t {
case types.ClientSync:
// TODO: Include the ability to catch sync messages in order to
// close the current transaction.
//
// At completion of each series of extended-query messages, the frontend
// should issue a Sync message. This parameterless message causes the
// backend to close the current transaction if it's not inside a
// BEGIN/COMMIT transaction block (“close” meaning to commit if no
// error, or roll back if error). Then a ReadyForQuery response is

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

No branches or pull requests

0 participants