Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions templates/patroni.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ postgresql:
bin_dir: /usr/lib/postgresql/{{ version }}/bin
listen: 0.0.0.0:5432
parameters:
shared_preload_libraries: 'timescaledb,pgaudit'
{%- if enable_pgbackrest_archiving %}
archive_command: 'pgbackrest --stanza={{ stanza }} archive-push %p'
{% else %}
Expand Down
6 changes: 5 additions & 1 deletion tests/integration/ha_tests/test_rollback_to_master_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
APPLICATION_NAME,
CHARM_BASE,
DATABASE_APP_NAME,
METADATA,
get_leader_unit,
get_primary,
get_unit_by_index,
Expand Down Expand Up @@ -108,8 +109,11 @@ async def test_fail_and_rollback(ops_test, continuous_writes) -> None:

application = ops_test.model.applications[DATABASE_APP_NAME]

resources = {"postgresql-image": METADATA["resources"]["postgresql-image"]["upstream-source"]}
application = ops_test.model.applications[DATABASE_APP_NAME]

logger.info("Refresh the charm")
await application.refresh(path=fault_charm)
await application.refresh(path=fault_charm, resources=resources)

logger.info("Get first upgrading unit")
# Highest ordinal unit always the first to upgrade.
Expand Down
6 changes: 5 additions & 1 deletion tests/integration/ha_tests/test_upgrade_to_primary_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
CHARM_BASE,
CHARM_SERIES,
DATABASE_APP_NAME,
METADATA,
get_leader_unit,
get_primary,
get_unit_by_index,
Expand Down Expand Up @@ -100,8 +101,11 @@ async def test_upgrade(ops_test, continuous_writes) -> None:
local_charm = await ops_test.build_charm(".")
application = ops_test.model.applications[DATABASE_APP_NAME]

resources = {"postgresql-image": METADATA["resources"]["postgresql-image"]["upstream-source"]}
application = ops_test.model.applications[DATABASE_APP_NAME]

logger.info("Refresh the charm")
await application.refresh(path=local_charm)
await application.refresh(path=local_charm, resources=resources)

logger.info("Get first upgrading unit")
# Highest ordinal unit always the first to upgrade.
Expand Down
Loading