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

Prevent use of extended query protocol for BEGIN before COPY #1639

Merged
merged 1 commit into from Dec 6, 2019

Conversation

@ringerc
Copy link
Member

ringerc commented Dec 6, 2019

When autocommit is off and the first query in a transaction is a COPY, we were
sending a BEGIN using the extended query protocol. It was being permitted to
use named portals as well, ignoring prepareThreshold.

Fix by forcing simple query mode and marking the BEGIN as oneshot.

Fixes #1638

When autocommit is off and the first query in a transaction is a COPY, we were
sending a BEGIN using the extended query protocol. It was being permitted to
use named portals as well, ignoring prepareThreshold.

Fix by forcing simple query mode and marking the BEGIN as oneshot.

Fixes #1638
@ringerc

This comment has been minimized.

Copy link
Member Author

ringerc commented Dec 6, 2019

I wasn't able to concoct a sensible regression test for this, so a quick review would be much appreciated.

@ringerc

This comment has been minimized.

Copy link
Member Author

ringerc commented Dec 6, 2019

CI failure was https://travis-ci.org/pgjdbc/pgjdbc/jobs/621530668?utm_medium=notification&utm_source=github_status

Failed tests: 
  LogicalReplicationTest.testDuringSendBigTransactionConnectionCloseSlotStatusNotActive:370 Execute close method on Connection should lead to stop replication as fast as possible, as result we wait that on view pg_replication_slots status for slot will change to no active
Expected: <false>
     but: was <true>

I don't see how that's related. Test bug?

@davecramer davecramer merged commit b371153 into pgjdbc:master Dec 6, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@paplorinc paplorinc mentioned this pull request Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.