|
|
|
@ -86,10 +86,36 @@ services:
|
|
|
|
|
restart: always
|
|
|
|
|
|
|
|
|
|
postgres:
|
|
|
|
|
image: postgres:14-alpine
|
|
|
|
|
image: postgres:15-alpine
|
|
|
|
|
# this needs to match the database host in lemmy.hson
|
|
|
|
|
# Tune your settings via
|
|
|
|
|
# https://pgtune.leopard.in.ua/#/
|
|
|
|
|
# You can use this technique to add them here
|
|
|
|
|
# https://stackoverflow.com/a/30850095/1655478
|
|
|
|
|
hostname: postgres
|
|
|
|
|
command: ["postgres", "-c", "session_preload_libraries=auto_explain", "-c", "auto_explain.log_min_duration=5ms", "-c", "auto_explain.log_analyze=true"]
|
|
|
|
|
command: [
|
|
|
|
|
"postgres",
|
|
|
|
|
"-c", "session_preload_libraries=auto_explain",
|
|
|
|
|
"-c", "auto_explain.log_min_duration=5ms",
|
|
|
|
|
"-c", "auto_explain.log_analyze=true"
|
|
|
|
|
# Tuning config
|
|
|
|
|
# "-c", "max_connections=200",
|
|
|
|
|
# "-c", "shared_buffers=3GB",
|
|
|
|
|
# "-c", "effective_cache_size=9GB",
|
|
|
|
|
# "-c", "maintenance_work_mem=768MB",
|
|
|
|
|
# "-c", "checkpoint_completion_target=0.9",
|
|
|
|
|
# "-c", "wal_buffers=16MB",
|
|
|
|
|
# "-c", "default_statistics_target=100",
|
|
|
|
|
# "-c", "random_page_cost=4",
|
|
|
|
|
# "-c", "effective_io_concurrency=2",
|
|
|
|
|
# "-c", "work_mem=7864kB",
|
|
|
|
|
# "-c", "min_wal_size=1GB",
|
|
|
|
|
# "-c", "max_wal_size=4GB",
|
|
|
|
|
# "-c", "max_worker_processes=4",
|
|
|
|
|
# "-c", "max_parallel_workers_per_gather=2",
|
|
|
|
|
# "-c", "max_parallel_workers=4",
|
|
|
|
|
# "-c", "max_parallel_maintenance_workers=2",
|
|
|
|
|
]
|
|
|
|
|
networks:
|
|
|
|
|
- lemmyinternal
|
|
|
|
|
# adding the external facing network to allow direct db access for devs
|
|
|
|
|