Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
DB_PASSWORD: nostr_ts_relay
DB_NAME: nostr_ts_relay
DB_MIN_POOL_SIZE: 5
DB_MAX_POOL_SIZE: 15
DB_MAX_POOL_SIZE: 25
REDIS_HOST: cache
REDIS_PORT: 6379
REDIS_USER: default
Expand Down Expand Up @@ -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:
Expand Down
27 changes: 27 additions & 0 deletions postgresql.conf
Original file line number Diff line number Diff line change
@@ -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 = 100
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