github ozontech/pg_doorman v3.5.0
v3.5.0 Binary upgrade

11 hours ago

Client migration during binary upgrade

Transaction mode clients transparently migrate to the new process with all their state. Applications notice nothing.

On SIGUSR2, the old process serializes each idle client (connection state, server parameters, prepared statement cache) and passes the TCP socket to the new process via SCM_RIGHTS. In-transaction clients finish their current transaction first, then migrate. The old process exits once all clients are gone or shutdown_timeout expires.

Prepared statements survive the upgrade. The cache is serialized with query text and parameter types, and transparently re-parsed on the new backend. Clients do not need to re-prepare anything.

kill -USR2 $(pgrep pg_doorman)

TLS migration without re-handshake (opt-in)

Build with --features tls-migration to also migrate TLS connections. A patched vendored OpenSSL 3.5.5 exports symmetric cipher state (keys, IVs, sequence numbers) and the new process imports it — the encrypted session continues on the same TCP socket without re-handshake. Linux only. Offline builds supported via OPENSSL_SOURCE_TARBALL.

See the binary upgrade documentation for configuration, monitoring, and troubleshooting.

Full changelog: https://ozontech.github.io/pg_doorman/changelog.html


Миграция клиентов при binary upgrade

Клиенты в transaction mode прозрачно переезжают в новый процесс со всем состоянием. Для приложения ничего не меняется.

При получении SIGUSR2 старый процесс сериализует каждого idle-клиента (состояние соединения, серверные параметры, кеш prepared statements) и передаёт TCP-сокет новому процессу через SCM_RIGHTS. Клиенты в транзакциях завершают текущую транзакцию, затем мигрируют. Старый процесс завершается когда все клиенты ушли или истёк shutdown_timeout.

Prepared statements переживают обновление. Кеш сериализуется с текстом запроса и типами параметров, и прозрачно переподготавливается на новом backend. Клиенту ничего переподготавливать не нужно.

kill -USR2 $(pgrep pg_doorman)

TLS-миграция без re-handshake (opt-in)

Сборка с --features tls-migration позволяет также мигрировать TLS-соединения. Патч к vendored OpenSSL 3.5.5 экспортирует симметричный cipher state (ключи, IV, sequence numbers), новый процесс импортирует его — зашифрованная сессия продолжается на том же TCP-сокете без re-handshake. Linux only. Offline-сборка через OPENSSL_SOURCE_TARBALL.

Подробности: binary upgrade guide (EN) | руководство (RU)

Полный changelog: https://ozontech.github.io/pg_doorman/changelog.html

Don't miss a new pg_doorman release

NewReleases is sending notifications on new releases.