Skip to content

Commit 4b1de5a

Browse files
committed
feat: add postgresql.conf
1 parent e7454c3 commit 4b1de5a

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ services:
4141
POSTGRES_PASSWORD: nostr_ts_relay
4242
volumes:
4343
- pgdata:/var/lib/postgresql/data/
44+
- ./postgresql.conf:/etc/postgresql.conf
4445
ports:
4546
- 15432:5432
4647
networks:

postgresql.conf

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# DB Version: 15
2+
# OS Type: linux
3+
# DB Type: oltp
4+
# Total Memory (RAM): 8 GB
5+
# CPUs num: 4
6+
# Connections num: 60
7+
# Data Storage: ssd
8+
9+
max_connections = 60
10+
shared_buffers = 2GB
11+
effective_cache_size = 6GB
12+
maintenance_work_mem = 512MB
13+
checkpoint_completion_target = 0.9
14+
wal_buffers = 16MB
15+
default_statistics_target = 100
16+
random_page_cost = 1.1
17+
effective_io_concurrency = 200
18+
work_mem = 17476kB
19+
min_wal_size = 2GB
20+
max_wal_size = 8GB
21+
max_worker_processes = 4
22+
max_parallel_workers_per_gather = 2
23+
max_parallel_workers = 4
24+
max_parallel_maintenance_workers = 2
25+
26+
logging_collector = on
27+
log_min_duration_statement = 500

0 commit comments

Comments
 (0)