Skip to content

Conversation

@Gagarin23
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings December 21, 2025 07:15
Copy link

Copilot AI left a 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_queries with default value true
  • Logic to skip caching for Parse, Bind, and Describe messages when they have empty names and prepare_anon_queries is 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.

Gagarin23 and others added 18 commits December 21, 2025 12:21
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
…aching' into add-flag-to-avoid-anon-queries-caching

# Conflicts:
#	src/client.rs
@vadv vadv changed the title Add support for disable caching anonymous queries and include relevant tests disable caching anonymous queries and relevant tests Dec 30, 2025
@vadv vadv mentioned this pull request Dec 30, 2025
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