DC Associates Group logoDC Associates Group

Home / Docs / PostgreSQL 16 (Hardened) / Configuration

Configure PostgreSQL 16 (Hardened)

Configuration files

/etc/postgresql/16/main/postgresql.conf and pg_hba.conf

Credential rotation

Create application roles with your own passwords: CREATE ROLE app LOGIN PASSWORD '...';

Monitoring & logging

Upgrades

Replace with the newest image version (monthly rebuild cadence), or `apt upgrade postgresql-16` / `dnf update` in place. Major-version upgrades via pg_upgrade — snapshot first.

Backup & restore

pg_dumpall via `sudo -u postgres pg_dumpall > backup.sql`, or stop the service and snapshot the volume.