feat: add postgresql.conf

This commit is contained in:
Ricardo Arturo Cabral Mejía
2022-12-16 21:34:24 -05:00
parent e7454c39be
commit 4b1de5afee
2 changed files with 28 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ services:
POSTGRES_PASSWORD: nostr_ts_relay
volumes:
- pgdata:/var/lib/postgresql/data/
- ./postgresql.conf:/etc/postgresql.conf
ports:
- 15432:5432
networks:

27
postgresql.conf Normal file
View File

@@ -0,0 +1,27 @@
# DB Version: 15
# OS Type: linux
# DB Type: oltp
# Total Memory (RAM): 8 GB
# CPUs num: 4
# Connections num: 60
# Data Storage: ssd
max_connections = 60
shared_buffers = 2GB
effective_cache_size = 6GB
maintenance_work_mem = 512MB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 17476kB
min_wal_size = 2GB
max_wal_size = 8GB
max_worker_processes = 4
max_parallel_workers_per_gather = 2
max_parallel_workers = 4
max_parallel_maintenance_workers = 2
logging_collector = on
log_min_duration_statement = 500