store-db: applying postgres system setting based on the stage
Signed-off-by: Alexis Pentori <alexis@status.im>
This commit is contained in:
parent
f85fc71b50
commit
af9162fc2e
|
@ -25,13 +25,18 @@ postgres_ha_databases:
|
||||||
pass: '{{lookup("bitwarden", "fleets/status/"+stage+"/db/nim-waku")}}'
|
pass: '{{lookup("bitwarden", "fleets/status/"+stage+"/db/nim-waku")}}'
|
||||||
|
|
||||||
# Avoid exceeding volume size with WAL log.
|
# Avoid exceeding volume size with WAL log.
|
||||||
postgres_ha_alter_system_settings:
|
postgres_ha_alter_system_settings: '{{ postgres_system_setting_default | combine(postgres_system_setting_stage[stage])}}'
|
||||||
|
|
||||||
|
postgres_system_setting_default:
|
||||||
checkpoint_timeout: '5min'
|
checkpoint_timeout: '5min'
|
||||||
max_wal_size: '1GB'
|
max_wal_size: '1GB'
|
||||||
min_wal_size: '80MB'
|
min_wal_size: '80MB'
|
||||||
max_locks_per_transaction: '2160'
|
max_locks_per_transaction: '2160'
|
||||||
autovacuum_work_mem: '{{ ((ansible_memtotal_mb * 0.1) * 1000) | int }}' # kB
|
autovacuum_work_mem: '{{ ((ansible_memtotal_mb * 0.1) * 1000) | int }}' # kB
|
||||||
|
|
||||||
|
postgres_system_setting_stage:
|
||||||
|
staging: {}
|
||||||
|
prod:
|
||||||
## The following are obtained from https://pgtune.leopard.in.ua/ (8GB RAM 4CPUs SSD PG version 15)
|
## The following are obtained from https://pgtune.leopard.in.ua/ (8GB RAM 4CPUs SSD PG version 15)
|
||||||
max_connections: '300'
|
max_connections: '300'
|
||||||
shared_buffers: '2GB'
|
shared_buffers: '2GB'
|
||||||
|
|
Loading…
Reference in New Issue