Open magiccrafter opened 1 year ago
Version 0.38.0 that was shipped recently improved shutdown handling:
The above is designed to align as much as possible with https://www.postgresql.org/docs/current/server-shutdown.html. You can 'upgrade' from SMART to FAST shutdown mode by first sending PGAdapter a SIGTERM, then wait X seconds, and then send it a SIGINT.
The
--max-sigterm-delay
flag is crucial for microservices that require a graceful shutdown period to ensure ongoing transactions are completed successfully. This flag allows the microservice to remain operational for a specified duration after receiving a termination signal (SIGTERM), granting sufficient time for its database connector to remain active and handle pending transactions.Disclaimer: The name of the flag and the description are copied from the https://github.com/GoogleCloudPlatform/cloud-sql-proxy
Implementing this feature will smoothen the transition from Postgres to Spanner.