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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project follows [Semantic Versioning](https://semver.org/).
- Fail standby setup before mutation when required credentials do not resolve.
- Scope standby rollback to the requested host and keep existing cluster nodes intact.
- Preserve pgBackRest recovery options as one shell-safe argument during remote restore.
- Preserve the complete pgBackRest command as the single `bash -lc` command string.
- Run component rollback in local Ruby context instead of an SSHKit backend scope.

## 0.9.6 - 2026-08-20
Expand Down
2 changes: 1 addition & 1 deletion lib/active_postgres/components/repmgr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ def pgbackrest_restore_arguments(primary_conninfo)

[
:sudo, '-u', config.postgres_user,
:bash, '-lc', command
:bash, '-lc', Shellwords.escape(command)
]
end

Expand Down
4 changes: 3 additions & 1 deletion test/repmgr_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ def test_pgbackrest_restore_uses_standby_mode_and_primary_conninfo
arguments = @component.send(:pgbackrest_restore_arguments, conninfo)

assert_equal [:sudo, '-u', 'postgres', :bash, '-lc'], arguments.first(5)
transported_command = Shellwords.split(arguments.fetch(5))
assert_equal 1, transported_command.length
assert_equal [
'pgbackrest', '--stanza=main', '--type=standby',
"--recovery-option=primary_conninfo=#{conninfo}", 'restore'
], Shellwords.split(arguments.fetch(5))
], Shellwords.split(transported_command.fetch(0))
end

def test_manual_failover_policy_disables_repmgrd
Expand Down