Honor PostgreSQL TLS settings in pool key#278
Conversation
| #[test] | ||
| fn postgres_pool_key_ignores_mysql_ssl_key_fields() { | ||
| fn postgres_pool_key_changes_when_ssl_mode_changes() { | ||
| let required = connection_params("postgres", Some("required")); |
There was a problem hiding this comment.
SUGGESTION: Use "require" instead of "required" for PostgreSQL SSL mode
The test now validates PostgreSQL-specific pool-key behavior, but "required" is a MySQL-style mode name. PostgreSQL uses "require". All other PostgreSQL tests in this file already use "require", so updating this keeps the test consistent and avoids confusing future maintainers.
| let required = connection_params("postgres", Some("required")); | |
| let required = connection_params("postgres", Some("require")); |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The previously reported typo ( Files Reviewed (2 files)
Reviewed by kimi-k2.6-20260420 · 155,470 tokens |
|
LGTM 🚀 @arsis-dev @debba — verified the key matches what |
|
Thanks a lot @arsis-dev and @NewtTheWolf for the review |
|
Thanks to you @debba! 🙏 Tabularis has been really useful and inspiring to me. I really appreciate your work. |
|
Always welcome to contribute! |
Summary
ssl_modein the pool key so cached pools are scoped by the selected TLS mode.ssl_cain the pool key forverify-caandverify-full, where the connector actually uses a CA file.Context
This is a follow-up to #263. PostgreSQL pool creation already honors
ssl_modeandssl_ca, but the shared pool key only varied by TLS settings for MySQL. After editing a PostgreSQL connection from one TLS mode or CA path to another, the main connection path could reuse an incompatible cached pool.I did not find an existing open issue or PR for this exact PostgreSQL pool-key scoping bug. Related items checked:
This is intentionally scoped to PostgreSQL pool-key construction and does not change PostgreSQL TLS connector behavior.
Validation
cargo test postgres_pool_key_changes_when_ssl-> 2 passedcargo test pool_manager-> 23 passedgit diff --check-> passednpm --cache /tmp/gitnexus-npm-cache exec --yes gitnexus -- analyze-> indexed successfully, 11,576 nodes / 21,769 edges / 300 flowsnpm --cache /tmp/gitnexus-npm-cache exec --yes gitnexus -- impact build_connection_key --direction upstream-> CRITICAL risk, 74 impacted symbols, 5 direct callers, 6 affected flowsnpm --cache /tmp/gitnexus-npm-cache exec --yes gitnexus -- detect-changes --scope compare --base-ref main-> medium risk, 6 changed symbols, 4 affected flows