Skip to content

Invalidate statement cache when necessary - #317

Open
charles-dyfis-net wants to merge 2 commits into
cockroachdb:masterfrom
charles-dyfis-net:stale-placeholder-management
Open

charles-dyfis-net wants to merge 2 commits into
cockroachdb:masterfrom
charles-dyfis-net:stale-placeholder-management

Conversation

@charles-dyfis-net

Copy link
Copy Markdown

SQLAlchemy's recognition of situations when prepared statements need to be regenerated presently does not fully apply to CrDB.

Parts of, but not the entirety of, this work will be mooted if MagicStack/asyncpg#1408 is merged.

@charles-dyfis-net

Copy link
Copy Markdown
Author

This is split into two commits: the second one has some risk of unnecessary cache clears, while the first handles only the subset of cases we're comfortable we can address without side effects.

…he errors

A newly prepared statement that uses one placeholder as two types raises the same error, so this sometimes clears the cache unnecessarily.
@charles-dyfis-net
charles-dyfis-net force-pushed the stale-placeholder-management branch from ac6da8f to 2aabd17 Compare November 17, 2026 22:41
@gordthompson gordthompson self-assigned this Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants