From d3207edf187819fbd51cbec17fc3e5a50b6009b4 Mon Sep 17 00:00:00 2001 From: Alex Kasko Date: Tue, 7 Apr 2026 19:52:34 +0100 Subject: [PATCH] Fix flaky pool test Intermittent CI failure example ``` 1. test/sql/storage/attach_connection_pool.test:81 ================================================================================ Wrong result in query! (test/sql/storage/attach_connection_pool.test:81)! ================================================================================ SELECT catalog_name, available_connections, thread_local_cache_enabled FROM postgres_configure_pool(catalog_name='s'); ================================================================================ Mismatch on row 1, column available_connections(index 2) 1 <> 0 ================================================================================ Expected result: ================================================================================ s 0 FALSE ================================================================================ Actual result: ================================================================================ s 1 0 ``` Run: https://github.com/duckdb/duckdb-postgres/actions/runs/24059225425/job/70172331831 --- test/sql/storage/attach_connection_pool.test | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/sql/storage/attach_connection_pool.test b/test/sql/storage/attach_connection_pool.test index 6b39caaa8..540f0bb95 100644 --- a/test/sql/storage/attach_connection_pool.test +++ b/test/sql/storage/attach_connection_pool.test @@ -70,19 +70,22 @@ statement ok DETACH s statement ok -ATTACH 'dbname=postgresscanner' AS s (TYPE POSTGRES); +SET pg_pool_enable_thread_local_cache = FALSE statement ok -USE s; +ATTACH 'dbname=postgresscanner' AS s (TYPE POSTGRES); statement ok -FROM postgres_configure_pool(catalog_name='s', enable_thread_local_cache=FALSE) +USE s; query III SELECT catalog_name, available_connections, thread_local_cache_enabled FROM postgres_configure_pool(catalog_name='s') ---- -s 0 FALSE +s 1 FALSE + +statement ok +RESET pg_pool_enable_thread_local_cache statement ok SELECT catalog_name, health_check_query