Skip to main content

install_shared_pool_registry

Function install_shared_pool_registry 

Source
pub fn install_shared_pool_registry()
Expand description

Install the process-lifetime shared pool registry. Idempotent: calling it more than once is harmless (subsequent calls are no-ops and keep the first registry). Intended to be called once by a long-lived server embedder at startup, before serving requests.

After this is installed, pg_pool/pg_connect calls whose full connection identity matches an already-open pool reuse it instead of opening a new one, across requests and worker threads. The CLI never calls this, so the CLI one-shot path is unchanged.