managarten/docker/postgres/postgresql.conf
Till JS fcd7c82ce4 fix(infra): simplify PostgreSQL backup to pg_dumpall + pg_basebackup
pgBackRest as Docker sidecar was overly complex (needs shared WAL
directory, stanza management, special entrypoint). Replace with a
simpler, proven approach using native PostgreSQL tools:

Backup container (postgres:16-alpine):
- Hourly: pg_dumpall | gzip (all databases as SQL, ~2 day retention)
- Daily 03:00: pg_basebackup -Ft -z (physical backup, 30 day retention)
- Auto-cleanup of old backups
- Storage: /Volumes/ManaData/backups/postgres/

Also: Remove pgbackrest.conf, simplify postgresql.conf (remove WAL
archiving config, keep performance tuning + replication for basebackup)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 11:39:20 +01:00

19 lines
403 B
Text

# PostgreSQL Performance Tuning for Mac Mini (16GB RAM)
# Shared with ~70 other containers, so conservative settings
# Performance
shared_buffers = 512MB
effective_cache_size = 2GB
work_mem = 16MB
maintenance_work_mem = 128MB
# WAL Settings
max_wal_size = 1GB
min_wal_size = 80MB
# Replication (for pg_basebackup)
max_wal_senders = 3
# Logging
log_min_duration_statement = 1000
log_checkpoints = on