I would like to modify postgres options for existing cluster by editing ConfigMaps -pgha-config. Saving ConfigMap triggers updating configuration that we can see on postgres log and file postgresql.conf is updated. Command patronictl list inform about Pending restart.
It works on percona operator v1.1.0.
On version 1.3.0 after updating ConfigMaps -pgha-config nothing happened. I tried to force reload configuration by patronictl reload but new configuration not appear in postgresql.conf and does not apply to cluster.
Have you some idea ?
Thanks in advance
I would like drop some words
As for me patroni is not triggered by changes occured in configMap pg-cms-pgha-config that is mapped to postgres pod to /pgconf/pg-cms-dcs-config and does not update config file /pgdata/pg-cms/postgresql.conf threfore nothing happend with
I would like to change parameter logging_collector: off
Could you explain someone why patroni does not see changes, please ?
bash-4.4$ cat /pgconf/pg-cms-dcs-config
postgresql:
parameters:
archive_command: source /opt/crunchy/bin/postgres-ha/pgbackrest/pgbackrest-set-env.sh
&& pgbackrest archive-push "%p"
archive_mode: true
archive_timeout: 60
jit: false
log_connections: false
log_directory: pg_log
log_disconnections: false
log_min_duration_statement: 60000
log_statement: none
logging_collector: on
max_connections: 200
max_wal_senders: 6
shared_buffers: 128MB
shared_preload_libraries: pg_stat_monitor,pgaudit,pg_stat_statements
ssl: "on"
ssl_ca_file: /pgconf/tls/ca.crt
ssl_cert_file: /pgconf/tls/tls.crt
ssl_key_file: /pgconf/tls/tls.key
temp_buffers: 8MB
unix_socket_directories: /tmp
wal_level: logical
work_mem: 4MB
recovery_conf:
restore_command: source /opt/crunchy/bin/postgres-ha/pgbackrest/pgbackrest-set-env.sh
&& pgbackrest archive-get %f "%p"
use_pg_rewind: true
bash-4.4$ cat /pgdata/pg-cms/postgresql.conf
# Do not edit this file manually!
# It will be overwritten by Patroni!
include 'postgresql.base.conf'
archive_command = 'source /opt/crunchy/bin/postgres-ha/pgbackrest/pgbackrest-set-env.sh && pgbackrest archive-push "%p"'
archive_mode = 'True'
archive_timeout = '60'
cluster_name = 'pg-cms'
hot_standby = 'on'
jit = 'False'
listen_addresses = '0.0.0.0'
log_connections = 'True'
log_directory = 'pg_log'
log_disconnections = 'True'
log_min_duration_statement = '60000'
log_statement = 'none'
max_connections = '200'
max_locks_per_transaction = '64'
max_prepared_transactions = '0'
max_replication_slots = '10'
max_wal_senders = '6'
max_worker_processes = '8'
port = '5432'
shared_buffers = '128MB'
shared_preload_libraries = 'pg_stat_monitor,pgaudit,pg_stat_statements'
ssl = 'on'
ssl_ca_file = '/pgconf/tls/ca.crt'
ssl_cert_file = '/pgconf/tls/tls.crt'
ssl_key_file = '/pgconf/tls/tls.key'
temp_buffers = '8MB'
track_commit_timestamp = 'off'
unix_socket_directories = '/tmp'
wal_keep_size = '128MB'
wal_level = 'logical'
wal_log_hints = 'on'
work_mem = '4MB'
hba_file = '/pgdata/pg-cms/pg_hba.conf'
ident_file = '/pgdata/pg-cms/pg_ident.conf'
# recovery.conf
primary_conninfo = 'user=primaryuser passfile=/tmp/.pgpass host=10.0.14.39 port=5432 sslmode=verify-ca sslcert=/pgconf/tls-replication/tls.crt sslkey=/pgconf/tls-replication/tls.key sslrootcert=/pgconf/tls/ca.crt application_name=pg-cms-5db646749c-xsgln gssencmode=prefer channel_binding=prefer'
recovery_target = ''
recovery_target_lsn = ''
recovery_target_name = ''
recovery_target_time = ''
recovery_target_timeline = 'latest'
recovery_target_xid = ''
restore_command = 'source /opt/crunchy/bin/postgres-ha/pgbackrest/pgbackrest-set-env.sh && pgbackrest archive-get %f "%p"'
Operator 1.x had many design limitations. I would reccommend using lastest version of 2.x
Where such parameters can be specified in CR
patroni:
dynamicConfiguration:
postgresql:
parameters:
max_parallel_workers: 2
work_mem: 2MB