Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(personhog): ping bulk pool connections before handing them out (#103233)

Nick Besta538701cc34b
diff --git a/rust/personhog-replica/src/main.rs b/rust/personhog-replica/src/main.rs
index 1ec1b85d2830..47473c718687 100644
--- a/rust/personhog-replica/src/main.rs
+++ b/rust/personhog-replica/src/main.rs
@@ -48,6 +48,7 @@ async fn create_storage(config: &Config) -> Arc<PostgresStorage> {
.min(config.bulk_max_pg_connections),
max_connections: config.bulk_max_pg_connections,
acquire_timeout: config.bulk_acquire_timeout(),
+ test_before_acquire: true,
statement_timeout_ms: config.bulk_statement_timeout(),
pool_name: Some("bulk_primary".to_string()),
..primary_pool_config.clone()