-
Notifications
You must be signed in to change notification settings - Fork 21.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reset prepared statement when schema changes imapact statement results.
fixes #3335
- Loading branch information
1 parent
d44702c
commit 6a28c51
Showing
2 changed files
with
51 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6a28c51
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.
I dunno if this will work inside a transaction: https://img.skitch.com/20111019-nceg3b4uye3meaj4pryd9wktqe.png
If there's a postgresql error inside a transaction, it needs to be rolled back to the last savepoint/transaction.
6a28c51
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.
When I was looking at this, I couldn't figure out a way to do it that didn't involve wrapping every single query inside a savepoint, which is probably a stupid thing to do.
6a28c51
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.
The postgresql log from that test run:
6a28c51
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.
It fails if PostgreSQL version < 9.0.