Skip to content

Fix byte representation of CancelRequest message #963

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 1 commit into from
Mar 30, 2016
Merged

Fix byte representation of CancelRequest message #963

merged 1 commit into from
Mar 30, 2016

Conversation

dorianj
Copy link

@dorianj dorianj commented Mar 10, 2016

I noticed that query cancellation was not working when connecting through pgbouncer,
even though it worked fine when directly connected. This is because we're appending an
extra null byte, and pgbouncer is strict about the packet length.
(per http://www.postgresql.org/docs/9.1/static/protocol-message-formats.html)

This removes the extraneous byte, which fixes cancellation against pgbouncer.

I noticed that query cancellation was not working when connecting through pgbouncer,
even though it worked fine when directly connected. This is because we're appending an
extra null byte, and pgbouncer is strict about the packet length.
(per http://www.postgresql.org/docs/9.1/static/protocol-message-formats.html)

This removes the extraneous byte, which fixes cancellation against pgbouncer.
@brianc
Copy link
Owner

brianc commented Mar 30, 2016

Ah dang nice catch! Thank you tons for digging in & putting this together. Merging now & pushing a new patch version out shortly.

@brianc brianc merged commit eabbeba into brianc:master Mar 30, 2016
@dorianj dorianj deleted the cancellation branch March 30, 2016 18:12
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