Operate PostgreSQL
Postgres holds product, authority, policy, session, delegation, outbox, key-reference, and audit state.
Prerequisites
Section titled “Prerequisites”Use release-matched migrations, an administrative migration role, service-specific credentials, and a tested backup. Do not grant service roles ownership or BYPASSRLS.
Procedure
Section titled “Procedure”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:
bash infra/postgres/scripts/validateMigrations.shMonitor pools, long transactions, timeouts, storage, audit partitions, and outbox age. Increase database capacity before aggregate service pools.
Verify
Section titled “Verify”Confirm migrations, schema_migrations, service roles, RLS, append-only audit permissions, and dependent readiness.
Recovery
Section titled “Recovery”Restore connectivity/capacity, then verify migrations, pools, outboxes, and readiness. For data loss, use complete restore; do not reconstruct authority or audit rows manually.
Next Step
Section titled “Next Step”Verify event delivery with Operate Redis Streams.

