Skip to content

Operate PostgreSQL

Postgres holds product, authority, policy, session, delegation, outbox, key-reference, and audit state.

Use release-matched migrations, an administrative migration role, service-specific credentials, and a tested backup. Do not grant service roles ownership or BYPASSRLS.

Compose and Helm run infra/postgres/scripts/migrate.sh in a one-shot workload. Files apply in order, one transaction each, under an advisory lock. Production operation is forward-only.

In a disposable database, run:

Terminal window
bash infra/postgres/scripts/validateMigrations.sh

Monitor pools, long transactions, timeouts, storage, audit partitions, and outbox age. Increase database capacity before aggregate service pools.

Confirm migrations, schema_migrations, service roles, RLS, append-only audit permissions, and dependent readiness.

Restore connectivity/capacity, then verify migrations, pools, outboxes, and readiness. For data loss, use complete restore; do not reconstruct authority or audit rows manually.

Verify event delivery with Operate Redis Streams.