mirror of
https://github.com/status-im/infra-status.git
synced 2025-02-27 14:50:40 +00:00
We are using partitions in our postgres DBs. And we have one partition per hour (24 partitions per day.) The default max_locks_per_transaction value (64) can cause "our of memory" and block issues in the DB because we use to have more than 64 partitions. With 2160 we aim to avoid that issue for 90 days (2160 == 90*24.) if we consider a time retention policy of 90 days. Nevertheless, we usually have time retention policy of 30 days in our Status fleets, but we are just adding some extra margin.
38 lines
1.2 KiB
YAML
38 lines
1.2 KiB
YAML
---
|
|
# Custom SSH accounts, should start from UID 8000.
|
|
bootstrap__active_extra_users:
|
|
- { name: ivan, uid: 8000, groups: ['docker', 'dockremap'], key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJBdm8y1PfWjT1pioaWJSZ2ETrUySb+dS/ifDg+VIpLY ivansete@status.im' }
|
|
|
|
postgres_ha_service_name: 'nim-waku-store-db'
|
|
postgres_ha_cont_image: 'postgres:15.1-alpine'
|
|
|
|
postgres_ha_is_master: true
|
|
postgres_ha_replica_enabled: false
|
|
postgres_ha_replica_allowed_addresses: []
|
|
|
|
postgres_ha_admin_user: 'postgres'
|
|
postgres_ha_admin_pass: '{{lookup("bitwarden", "fleets/shards/"+stage+"/db/admin")}}'
|
|
|
|
# Disable backups since we have multiple DCs
|
|
postgres_ha_backup: false
|
|
postgres_ha_backup_enabled: false
|
|
|
|
postgres_ha_databases:
|
|
- name: 'nim-waku'
|
|
user: 'nim-waku'
|
|
pass: '{{lookup("bitwarden", "fleets/shards/"+stage+"/db/nim-waku")}}'
|
|
|
|
# Avoid exceeding volume size with WAL log.
|
|
postgres_alter_system_settings:
|
|
checkpoint_timeout: '5min'
|
|
max_wal_size: '1GB'
|
|
min_wal_size: '80MB'
|
|
max_locks_per_transaction: '2160'
|
|
|
|
# Open PostgreSQL Port
|
|
open_ports_default_comment: '{{ postgres_ha_service_name }}'
|
|
open_ports_default_chain: 'SERVICES'
|
|
open_ports_default_protocol: 'tcp'
|
|
open_ports_list:
|
|
- { port: '{{ postgres_ha_cont_port }}', ipset: '{{ env }}.{{ stage }}' }
|