From 47abd252d5b5e1aaf2a657d90b844aa3a9907d15 Mon Sep 17 00:00:00 2001 From: Gabriele Bartolini Date: Tue, 22 Sep 2026 11:14:23 +0200 Subject: [PATCH] fix: log transient connectivity errors during WAL restore Requires Barman 3.20.0 Closes #1111 Signed-off-by: Gabriele Bartolini --- internal/cnpgi/common/wal.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/cnpgi/common/wal.go b/internal/cnpgi/common/wal.go index 537fa34e..2b12b02d 100644 --- a/internal/cnpgi/common/wal.go +++ b/internal/cnpgi/common/wal.go @@ -408,6 +408,11 @@ func (w WALServiceImplementation) restoreFromBarmanObjectStore( // is the one that PostgreSQL has requested to restore. // The failure has already been logged in walRestorer.RestoreList method if walStatus[0].Err != nil { + if errors.Is(walStatus[0].Err, barmanRestorer.ErrConnectivity) { + // Only available from Barman 3.20.0 + contextLogger.Info("transient connectivity issue while restoring WAL, will retry", + "walName", walStatus[0].WalName, "error", walStatus[0].Err) + } return classifyWALRestoreError(walStatus[0].WalName, walStatus[0].Err) }