juju ssh postgresql/0 sudo cat /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml | grep archive
For each unit, it will show archive_command: 'pgbackrest --config=/var/snap/charmed-postgresql/current/etc/pgbackrest/pgbackrest.conf --stanza=dev.postgresql archive-push %p'
juju remove-unit postgresql/2 - but choose your primary
Wait until cluster stabilizes
Do the step 4, but now see archive_command: /bin/true in the output for each unit
Steps to reproduce
juju deploy s3-integrator
, and configure itjuju deploy postgresql --channel edge --config profile=testing -n 3
juju integrate postgresql s3-integrator
juju ssh postgresql/0 sudo cat /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml | grep archive
For each unit, it will showarchive_command: 'pgbackrest --config=/var/snap/charmed-postgresql/current/etc/pgbackrest/pgbackrest.conf --stanza=dev.postgresql archive-push %p'
juju remove-unit postgresql/2
- but choose your primaryarchive_command: /bin/true
in the output for each unitExpected behavior
Archiving is still enabled after primary changes
Actual behavior
Archiving is disables after primary changes
Versions
Operating system: Ubuntu 23.10
Juju CLI: 3.4.2-genericlinux-amd64
Juju agent: 3.4.0
Charm revision: 405
LXD: 5.21.1 LTS
Log output
Juju debug log: log.txt
Additional context
I found that stanza is being erased from app_peer_data in
_on_s3_credential_gone
function, and this causes described issue.