60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: postgres-hetzner-config
|
|
namespace: database
|
|
data:
|
|
postgresql.conf: |
|
|
# PostgreSQL configuration file
|
|
# Managed via Kubernetes ConfigMap (PostgreSQL/hetzner/postgres_configmap.yaml)
|
|
# Edit here, then: kubectl apply -f postgres_configmap.yaml
|
|
# Restart the Deployment to pick up changes: kubectl rollout restart deploy/postgres-hetzner -n database
|
|
|
|
# -----------------------------
|
|
# Connection settings
|
|
# -----------------------------
|
|
listen_addresses = '*'
|
|
port = 5432
|
|
max_connections = 100
|
|
|
|
# -----------------------------
|
|
# Memory / resource tuning
|
|
# -----------------------------
|
|
shared_buffers = 512MB
|
|
work_mem = 16MB
|
|
maintenance_work_mem = 256MB
|
|
effective_cache_size = 4GB
|
|
|
|
# -----------------------------
|
|
# WAL / replication
|
|
# -----------------------------
|
|
wal_level = replica
|
|
max_wal_size = 4GB
|
|
min_wal_size = 128MB
|
|
checkpoint_completion_target = 0.9
|
|
|
|
# -----------------------------
|
|
# Query planner
|
|
# -----------------------------
|
|
random_page_cost = 1.1
|
|
effective_io_concurrency = 200
|
|
|
|
# -----------------------------
|
|
# Autovacuum
|
|
# -----------------------------
|
|
autovacuum_max_workers = 3
|
|
autovacuum_naptime = 60s
|
|
|
|
# -----------------------------
|
|
# Logging
|
|
# -----------------------------
|
|
log_destination = 'stderr'
|
|
logging_collector = off
|
|
log_min_duration_statement = -1
|
|
log_connections = off
|
|
log_disconnections = off
|
|
|
|
# -----------------------------
|
|
# Extensions (pgvector)
|
|
# -----------------------------
|
|
shared_preload_libraries = '' |