fix(volumesnapshots,cnpg-i): ensure `CheckEmptyWalArchive` runs during WAL restore by mnencia · Pull Request #9306 · cloudnative-pg/cloudnative-pg

@dosubot dosubot bot added the size:S

This PR changes 10-29 lines, ignoring generated files.

label

Nov 24, 2025

@mnencia mnencia changed the title fix(restore): ensure destination WAL archive path is empty on CNPG-I plugin restore fix(volumesnapshots): check empty wal archive on CNPG-I plugin restore

Nov 24, 2025

jbattiato

@dosubot dosubot bot added the lgtm

This PR has been approved by a maintainer

label

Nov 25, 2025

gabriele-wolfox

gbartolini

@gbartolini gbartolini changed the title fix(volumesnapshots): check empty wal archive on CNPG-I plugin restore fix(volumesnapshots): ensure CheckEmptyWalArchive runs with CNPG-I plugin restore

Nov 26, 2025

@gbartolini gbartolini changed the title fix(volumesnapshots): ensure CheckEmptyWalArchive runs with CNPG-I plugin restore fix(volumesnapshots,cnpg-i): ensure CheckEmptyWalArchive runs during WAL restore

Nov 26, 2025

@mnencia

Closes #9305

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>

cnpg-bot pushed a commit that referenced this pull request

Nov 27, 2025
…g WAL restore (#9306)

The `CheckEmptyWalArchive` safeguard was not executed when restoring
from a volume snapshot using a CNPG-I backup/WAL plugin (e.g.
`plugin-barman-cloud`).
This was due to the operator skipping creation of the
`CheckEmptyWalArchiveFile` marker and relying instead on an early direct
call to the in-tree `barman-cloud-check-wal-archive` command—an approach
incompatible with external plugins.

This patch ensures that the `CheckEmptyWalArchive` mechanism is
triggered reliably for both in-tree and plugin-based WAL archive
implementations during snapshot restore.

Closes #9305

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
(cherry picked from commit 01e673d)

cnpg-bot pushed a commit that referenced this pull request

Nov 27, 2025
…g WAL restore (#9306)

The `CheckEmptyWalArchive` safeguard was not executed when restoring
from a volume snapshot using a CNPG-I backup/WAL plugin (e.g.
`plugin-barman-cloud`).
This was due to the operator skipping creation of the
`CheckEmptyWalArchiveFile` marker and relying instead on an early direct
call to the in-tree `barman-cloud-check-wal-archive` command—an approach
incompatible with external plugins.

This patch ensures that the `CheckEmptyWalArchive` mechanism is
triggered reliably for both in-tree and plugin-based WAL archive
implementations during snapshot restore.

Closes #9305

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
(cherry picked from commit 01e673d)

cnpg-bot pushed a commit that referenced this pull request

Nov 27, 2025
…g WAL restore (#9306)

The `CheckEmptyWalArchive` safeguard was not executed when restoring
from a volume snapshot using a CNPG-I backup/WAL plugin (e.g.
`plugin-barman-cloud`).
This was due to the operator skipping creation of the
`CheckEmptyWalArchiveFile` marker and relying instead on an early direct
call to the in-tree `barman-cloud-check-wal-archive` command—an approach
incompatible with external plugins.

This patch ensures that the `CheckEmptyWalArchive` mechanism is
triggered reliably for both in-tree and plugin-based WAL archive
implementations during snapshot restore.

Closes #9305

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
(cherry picked from commit 01e673d)

mnencia added a commit that referenced this pull request

Jan 20, 2026
…g WAL restore (#9306)

The `CheckEmptyWalArchive` safeguard was not executed when restoring
from a volume snapshot using a CNPG-I backup/WAL plugin (e.g.
`plugin-barman-cloud`).
This was due to the operator skipping creation of the
`CheckEmptyWalArchiveFile` marker and relying instead on an early direct
call to the in-tree `barman-cloud-check-wal-archive` command—an approach
incompatible with external plugins.

This patch ensures that the `CheckEmptyWalArchive` mechanism is
triggered reliably for both in-tree and plugin-based WAL archive
implementations during snapshot restore.

Closes #9305

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
(cherry picked from commit 01e673d)