github ozontech/pg_doorman v3.3.1
v3.3.1 (Feb 26, 2026)

9 hours ago

Bug Fixes

  • Fix Ctrl+C in foreground mode (#137): Pressing Ctrl+C in foreground mode (with TTY attached) now performs a clean graceful shutdown instead of triggering a binary upgrade. Previously, each Ctrl+C would spawn a new pg_doorman process via --inherit-fd, leaving orphan processes accumulating. SIGINT in daemon mode (no TTY) retains its legacy binary upgrade behavior for backward compatibility with existing systemd units.

  • Minimum pool size enforcement (min_pool_size) (#135): The min_pool_size user setting is now enforced at runtime. After each connection retain cycle, pg_doorman checks pool sizes and creates new connections to maintain the configured minimum. Previously, min_pool_size was accepted in config but never applied — pools started empty and could drop to 0 connections even with min_pool_size set. Replenishment stops on the first connection failure to avoid hammering an unavailable server.

New Features

  • SIGUSR2 for binary upgrade (#137): New dedicated signal SIGUSR2 triggers binary upgrade + graceful shutdown in all modes (daemon and foreground). This is now the recommended signal for binary upgrades. The systemd service file has been updated to use SIGUSR2 for ExecReload.

  • UPGRADE admin command (#137): New admin console command that triggers binary upgrade via SIGUSR2. Use it from psql connected to the admin database: UPGRADE;.

Improvements

  • Pool prewarm at startup (#135): When min_pool_size is configured, pg_doorman now creates the minimum number of connections immediately at startup, before the first retain cycle. Previously, pools started empty and connections were only created lazily on first client request or after the first retain interval (default 60s). This eliminates cold-start latency for the first clients connecting after pg_doorman restart.

  • Configurable connection scaling parameters (#134): New general settings scaling_warm_pool_ratio, scaling_fast_retries, and scaling_cooldown_sleep allow tuning connection pool scaling behavior. All three can be overridden at the pool level. scaling_cooldown_sleep uses the human-readable Duration type (e.g. "10ms", "1s") consistent with other timeout fields.

  • max_concurrent_creates setting (#134): Controls the maximum number of server connections that can be created concurrently per pool. Uses a semaphore instead of a mutex for parallel connection creation.

Signal Reference

Signal Daemon / no TTY Foreground + TTY (Ctrl+C)
SIGUSR2 Binary upgrade + graceful shutdown (recommended) Binary upgrade + graceful shutdown (recommended)
SIGINT Binary upgrade + graceful shutdown (legacy) Graceful shutdown only (fixed)
SIGTERM Immediate shutdown Immediate shutdown
SIGHUP Reload configuration Reload configuration

Full Changelog: v3.3.0...v3.3.1

Don't miss a new pg_doorman release

NewReleases is sending notifications on new releases.