Skip to content

Commit 5cf5446

Browse files
authored
chore(postgres): add patroni and postgres params (#15)
1 parent 6c25e1c commit 5cf5446

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

rootfs/entrypoint.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@ fi
1010
cat > /data/patroni.yaml <<__EOF__
1111
bootstrap:
1212
dcs:
13+
ttl: 30
14+
loop_wait: 10
15+
retry_timeout: 10
16+
maximum_lag_on_failover: 1048576
17+
failsafe_mode: true
1318
postgresql:
1419
use_pg_rewind: true
20+
use_slots: true
1521
initdb:
1622
- auth-host: md5
1723
- auth-local: trust
@@ -29,6 +35,22 @@ postgresql:
2935
parameters:
3036
timescaledb.license: 'timescale'
3137
shared_preload_libraries: 'auto_explain,timescaledb,pg_stat_statements'
38+
hot_standby: "on"
39+
max_connections: 1005
40+
max_worker_processes: 8
41+
max_wal_senders: 10
42+
max_replication_slots: 10
43+
hot_standby_feedback: on
44+
max_prepared_transactions: 0
45+
max_locks_per_transaction: 64
46+
wal_log_hints: "on"
47+
track_commit_timestamp: "off"
48+
archive_mode: "on"
49+
archive_timeout: 300s
50+
archive_command: "/bin/true"
51+
log_min_duration_statement: 1000
52+
log_lock_waits: on
53+
log_statement: 'ddl'
3254
connect_address: '${PATRONI_KUBERNETES_POD_IP}:5432'
3355
authentication:
3456
superuser:

0 commit comments

Comments
 (0)