recovery.conf doesn't include primary_conninfo for streaming replication
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postgresql (Juju Charms Collection) |
Fix Released
|
Undecided
|
Andreas Hasenack |
Bug Description
The recovery.conf template conditionally includes primary_conninfo for streaming replication, if enabled:
"""
standby_mode = on
recovery_
{% if streaming_
primary_conninfo = 'host={{host}} user=juju_
{% endif %}
{% if restore_command %}
restore_command = '{{restore_
{% endif %}
"""
streaming_
The code that writes out the template file, however, doesn't give the streaming_
recovery_conf = Template(
'host': master_host,
'password': local_state[
So it's not rendered, and the second postgresql unit does no replication at all and remains read-only.
Related branches
- Stuart Bishop (community): Approve
-
Diff: 17 lines (+3/-1)1 file modifiedhooks/hooks.py (+3/-1)
Changed in postgresql (Juju Charms Collection): | |
status: | In Progress → Fix Released |
tags: | added: landscape |
Note that the code also doesn't include the restore_command variable, but I couldn't find where that one was defined. Maybe it's work in progress and should be removed. Or it's a config setting that wasn't added to the charm's config.yaml by mistake.