store-db: set autovacuum_work_mem to 10% of memory

We have seen host crashes caused by PostgreSQL using up all memory by
trying to run `autovacuum` workers.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2024-07-16 13:33:20 +02:00
parent 97544ad634
commit f554fe7185
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
1 changed files with 1 additions and 0 deletions

View File

@ -28,6 +28,7 @@ postgres_alter_system_settings:
max_wal_size: '1GB'
min_wal_size: '80MB'
max_locks_per_transaction: '2160'
autovacuum_work_mem: '{{ ((ansible_memtotal_mb * 0.1) * 1000) | int }}' # kB
# Open PostgreSQL Port
open_ports_default_comment: '{{ postgres_ha_service_name }}'