I have created the three-node Patroni cluster. The Patroni configuration are showing as we provided in the Patroni YAML file:
postgres@postgresql0:~$ patronictl -c /etc/patroni.yaml show-config
loop_wait: 10
maximum_lag_on_failover: 1048576
postgresql:
parameters:
autovacuum_vacuum_cost_delay: 1ms
autovacuum_vacuum_cost_limit: 5000
lock_timeout: 25000ms
log_autovacuum_min_duration: 60s
log_destination: csvlog
log_directory: pg_log
log_line_prefix: 'time=%t, pid=%p %q db=%d, usr=%u, client=%h , app=%a, line=%l '
log_lock_waits: true
log_min_duration_statement: 5s
log_min_messages: info
log_statement: none
logging_collector: true
maintenance_work_mem: 2GB
max_connections: 10000
max_replication_slots: 10
max_wal_size: 500GB
min_wal_size: 500GB
random_page_cost: 1.0
wal_buffers: -1
wal_keep_segments: 320
wal_level: logical
wal_sender_timeout: 0
use_pg_rewind: true
use_slots: true
retry_timeout: 10
ttl: 30
But when we are checking in the psql
console , it is giving the default configuration of Postgres.
postgres@postgresql0:~$ psql
postgres=# show autovacuum_vacuum_cost_delay;
autovacuum_vacuum_cost_delay
------------------------------
2ms
(1 row)
postgres=# show max_connections;
max_connections
-----------------
100
(1 row)*
Can anyone please explain why this is happening and correct it?
PostgreSQL should load the parameters that are provided in the Patroni YAML.