Skip to content

fix(plugin): do not append pgData if walName already contains it#6964

Merged
mnencia merged 1 commit intomainfrom
dev/wal-fix
Feb 25, 2025
Merged

fix(plugin): do not append pgData if walName already contains it#6964
mnencia merged 1 commit intomainfrom
dev/wal-fix

Conversation

@armru
Copy link
Member

@armru armru commented Feb 25, 2025

This patch prevents the plugin executor to append $PGDATA/pg_wal two times
when the archiving of a WAL file is requested.

This was happening when archiving the ready WALs in a former primary.

Fixes: #6965
Fixes: cloudnative-pg/plugin-barman-cloud#164

@armru armru requested a review from a team as a code owner February 25, 2025 09:24
@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.22 release-1.24 release-1.25 labels Feb 25, 2025
@github-actions
Copy link
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@armru armru added no-issue and removed backport-requested ◀️ This pull request should be backported to all supported releases release-1.22 release-1.24 release-1.25 labels Feb 25, 2025
@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

3 similar comments
@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@leonardoce leonardoce self-assigned this Feb 25, 2025
@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

1 similar comment
@github-actions
Copy link
Contributor

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@leonardoce
Copy link
Contributor

This is just a quick fix with the intent of avoiding any side effects.
A more proper refactor will address the underlying issue and ensure that plugins will be called in the same way as PostgreSQL calls archive_command.

@leonardoce
Copy link
Contributor

@leonardoce
Copy link
Contributor

The E2e test run failed because of #6932
I'm starting it again.

https://github.com/EnterpriseDB/cloudnative-pg/actions/runs/13523799301

@mnencia
Copy link
Member

mnencia commented Feb 25, 2025

/ok-to-merge E2E green on EDB fork

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Feb 25, 2025
@mnencia mnencia merged commit 918f9b0 into main Feb 25, 2025
25 checks passed
@mnencia mnencia deleted the dev/wal-fix branch February 25, 2025 17:37
Endevir pushed a commit to Endevir/cloudnative-pg that referenced this pull request Nov 6, 2025
…udnative-pg#6964)

This patch prevents the plugin executor from appending `$PGDATA/pg_wal` two
times when the archiving of a WAL file is requested.

This was happening when archiving the ready WALs in a former primary.

Fixes: cloudnative-pg#6965
Fixes: cloudnative-pg/plugin-barman-cloud#164

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
leonardoce pushed a commit that referenced this pull request Nov 12, 2025
This commit fixes incorrect walrestore path passed to plugins if
destination path is already absolute.

See #6964
Closes #9067

Signed-off-by: Ivan Arkhipov <endevir@yandex-team.ru>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
cnpg-bot pushed a commit that referenced this pull request Nov 12, 2025
This commit fixes incorrect walrestore path passed to plugins if
destination path is already absolute.

See #6964
Closes #9067

Signed-off-by: Ivan Arkhipov <endevir@yandex-team.ru>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit 70d884f)
cnpg-bot pushed a commit that referenced this pull request Nov 12, 2025
This commit fixes incorrect walrestore path passed to plugins if
destination path is already absolute.

See #6964
Closes #9067

Signed-off-by: Ivan Arkhipov <endevir@yandex-team.ru>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit 70d884f)
leonardoce pushed a commit that referenced this pull request Nov 12, 2025
This commit fixes incorrect walrestore path passed to plugins if
destination path is already absolute.

See #6964
Closes #9067

Signed-off-by: Ivan Arkhipov <endevir@yandex-team.ru>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit 70d884f)
mnencia pushed a commit that referenced this pull request Jan 20, 2026
This commit fixes incorrect walrestore path passed to plugins if
destination path is already absolute.

See #6964
Closes #9067

Signed-off-by: Ivan Arkhipov <endevir@yandex-team.ru>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit 70d884f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok to merge 👌 This PR can be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: WAL archiving on former primary is triggered with an absolute path [bug] WAL archiving not working on former primary

4 participants