-
Notifications
You must be signed in to change notification settings - Fork 91
/
customPostgresql.conf
41 lines (36 loc) · 1.04 KB
/
customPostgresql.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# DB Version: 15
# OS Type: linux
# DB Type: web
# Total Memory (RAM): 8 GB
# CPUs num: 4
# Data Storage: ssd
max_connections = 200
# This needs to match your shm_size in docker-compose.yml
shared_buffers = 2GB
effective_cache_size = 6GB
maintenance_work_mem = 512MB
checkpoint_completion_target = 0.9
checkpoint_timeout = 86400
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 5242kB
min_wal_size = 1GB
max_wal_size = 30GB
max_worker_processes = 4
max_parallel_workers_per_gather = 2
max_parallel_workers = 4
max_parallel_maintenance_workers = 2
# Other custom params
synchronous_commit=off
# This one shouldn't be on regularly, because DB migrations often take a long time
# statement_timeout = 10000
# Listen beyond localhost
listen_addresses = '*'
# Fix a memory leak issue with postgres 15
# https://github.com/LemmyNet/lemmy/issues/4406
#jit = 0
# Autoexplain and take stats by default
shared_preload_libraries = 'auto_explain,pg_stat_statements'
auto_explain.log_min_duration = 5000ms