-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
workload: reintroduce old prepare
behavior
#69313
Conversation
This reverts commit f446498, and makes the 'prepare' setting work more closely to how it used to. This is needed because we are seeing that the schemachange workload is deallocating huge amounts of automatically prepared statements. By explicitly preparing statements again, they should no longer be deallocated. Release justification: test-only change Release note: None
c5b87a6
to
d43adc8
Compare
I ran |
This makes it so we only prepare the statements we want to, which we control when we use the `prepare` mode. Release justification: test only change Release note: None
Ah I see, jackc/pgx@0c3e59b is new in pgx4 and enables this automatic prepared statement caching. I made a 2nd commit in this PR which turns that off and it has gotten rid of all the DEALLOCATE statements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
though I wonder how important the first commit is. What would happen if we only merged the second commit?
Reviewed 12 of 12 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @jordanlewis)
I agree, the 2nd commit is what prevents the thousands of DEALLOCATE statements. I think the 1st commit is still good since we shouldn't change the client behavior unintentionally. If we didn't merge the first commit, what would happen is that every query would be run using Parse/Bind/Execute every time, using an anonymous prepared statement. I feel that if we want that behavior it's better to opt-in explicitly by using the |
bors r=ajwerner |
Build succeeded: |
This reverts commit f446498,
and makes the 'prepare' setting work more closely to how it used to.
This is needed because we are seeing that the schemachange workload is
deallocating huge amounts of automatically prepared statements. By
explicitly preparing statements again, they should no longer be
deallocated.
This also disables the automatic prepared statement cache in pgx entirely,
which was enabled in jackc/pgx@0c3e59b
Release justification: test-only change
Release note: None