Repository navigation
Evict cached statements on schema change for tables with 10+ columns - #1753
Merged
Merged
Conversation
…clipse-vertx#1752) See eclipse-vertx#1751 Motivation: TABLE_SCHEMA_CHANGE_ERROR_MESSAGE_PATTERN matched the column counts with \d, a single digit, and String.matches requires a full match. So "bind message has 10 result formats but query has 11 columns" never matched, the stale cached statement was never evicted, and every later execution on the connection failed with the same error until the connection was closed. Postgres reports this error when a proxy such as RDS Proxy parses the named statement again after the schema change, before the client binds. Modifications: Match the column counts with \d+ and precompile the pattern. Add a test that uses a 10-column table, adds an 11th column, and re-prepares the named statement with DEALLOCATE / PREPARE to simulate the proxy. Result: The cached statement is evicted after the first failure, and the next execution succeeds. Assisted-by: Anthropic Claude (claude-opus-5-5) Signed-off-by: Meemaw <ematej.snuderl@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #1752