-
Notifications
You must be signed in to change notification settings - Fork 6
disable caching anonymous queries and relevant tests #67
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
base: master
Are you sure you want to change the base?
disable caching anonymous queries and relevant tests #67
Conversation
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.
Pull request overview
This PR adds support for disabling the caching of anonymous queries (queries without prepared statement names) through a new configuration option prepare_anon_queries. When set to false, anonymous queries bypass the prepared statement caching mechanism and are sent directly to the server. The default behavior (caching enabled) is preserved for backward compatibility.
Key changes:
- New configuration option
prepare_anon_querieswith default valuetrue - Logic to skip caching for Parse, Bind, and Describe messages when they have empty names and
prepare_anon_queriesis false - Test case demonstrating the feature with batch anonymous queries
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/config.rs | Adds prepare_anon_queries field to General config struct with default value true |
| src/client.rs | Implements logic to bypass prepared statement caching for anonymous queries when prepare_anon_queries is false |
| pg_doorman.toml | Documents the new prepare_anon_queries configuration option |
| tests/tests.toml | Sets prepare_anon_queries = false for testing the new functionality |
| tests/dotnet/data/anon_queries_without_prepare_on_server_side.cs | Test case executing 1024 anonymous batch queries to validate the feature |
| docker-compose-tests.mk | Adds test execution command for the anonymous queries test |
| .github/workflows/tests-pull-request.yaml | Integrates the anonymous queries test into the CI pipeline |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…t tests # Conflicts: # .github/workflows/tests-pull-request.yaml # docker-compose-tests.mk # tests/tests.toml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ontech#68) # Conflicts: # .github/workflows/tests-pull-request.yaml # docker-compose-tests.mk # tests/tests.toml
…t tests # Conflicts: # .github/workflows/tests-pull-request.yaml # docker-compose-tests.mk # tests/tests.toml
…ontech#68) # Conflicts: # .github/workflows/tests-pull-request.yaml # Cargo.lock # Cargo.toml # docker-compose-tests.mk # tests/bdd/shell_helper.rs # tests/tests.toml
…non-queries-caching
…aching' into add-flag-to-avoid-anon-queries-caching # Conflicts: # src/client.rs
No description provided.