Find every process that uses the old identity
Rotate the client identity when its private key is exposed or its certificate is approaching expiry. Every application using that identity will need the replacement. List web apps, bot workers, scheduled jobs and any external clients that connect. Record each client’s private file path and how you will restart or reload it.
For planned rotation, check the expiry and choose a window to pause writes. On a machine that already holds the certificate, the following command prints its expiry without printing the key.
openssl x509 -in client.pem -noout -enddateStop PostgreSQL and download the replacement
- Pause work that writes to the database and stop the PostgreSQL deployment from Overview. Wait for Offline.
- Open Connection → Rotate client identity as the deployment owner. Select the rotation action and download the new
client.pem. - Replace the private file for each consumer and restrict access to the app’s runtime user. Start PostgreSQL. Download the server certificate from Connection and make sure your clients use the current trust file.
Rotation changes the client authority that PostgreSQL trusts. Previously downloaded client identities will fail new connections after startup. The database still uses its existing data directory. Managed database identity controls.
Verify a new session before resuming work
Use the database hostname and port from Connection and run the verified psql test with the new files. Keep verify-full so the hostname and trust file are checked together. PostgreSQL TLS verification.
Restart apps that loaded the old files or held a database pool in memory. Check a normal application read, then resume writes and scheduled jobs. For a failure in only one app, compare its saved file paths, file permissions and allowed outbound IP when applicable. For a hostname or trust error, confirm the database hostname and re-download the server certificate from the same deployment.