-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PreparedStatement to set a unique name
PostgreSQL prepared statements and portals are referenced by names, where setting an empty string is ok, as it means it is unnamed prepared statement. [1] However there is a weird issue happening under high loads where a different set of parameters are being set to the wrong prepared statements: `bind message supplies 10 parameters, but prepared statement “...” requires 12` And also sporadically we get `ERROR: portal "" cannot be run` making it super hard to troubleshoot as all portals currently share the same name. Setting a unique name for each prepared statement has fixed the problem in our production setting, however I am not able to pinpoint why the problem exists in the first place, as "" seems to be a valid portal name. [1] - https://www.postgresql.org/docs/11/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY
- Loading branch information
Showing
3 changed files
with
31 additions
and
10 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
version in ThisBuild := "0.13.0-SNAPSHOT" | ||
version in ThisBuild := "0.13.1-SNAPSHOT" |