plugin-barman-cloud icon indicating copy to clipboard operation
plugin-barman-cloud copied to clipboard

[Feature request] Enhanced information related to WAL archiving

Open simonapencea opened this issue 1 year ago • 1 comments

The new ObjectStore CRD status that the barman cloud plugin introduces has taken over some of the backup-related information from the Cluster spec:

  • the first recoverability point
  • the last successful backup
  • the last failed backup They are all set together in this struct called RecoverabilityWindow, but in truth, for a continuous backup, these are not exactly the limits of the recoverability window, because on top of the last successful backup there can be wal files that essentially extend it. Therefore i think this information would be more valuable if it also shows information about the last archived WAL file (or the last archived WAL file that was streamed up into the object store being modeled by this CRD).

I noticed in the last release this PR https://github.com/cloudnative-pg/cloudnative-pg/pull/8780 shows more complete information about the WAL, i think including that in the ObjectStore status can be a good addition. It would allow more programatic access to this data instead of needing to use the kubectl cnpg status command separately or look into the prometheus metrics.

This is of course assuming this plugin is also used for WAL archiving, but as far as i’ve seen it is the only recommended option.

simonapencea avatar Oct 30 '25 09:10 simonapencea

+1 — confirming this affects us as well. Cluster.status fields are silently empty even when archiving is empirically healthy.

Reproduction:

  • operator: `ghcr.io/cloudnative-pg/cloudnative-pg:1.29.0`
  • plugin sidecar: `ghcr.io/cloudnative-pg/plugin-barman-cloud-sidecar:v0.12.0`
  • postgres: `ghcr.io/cloudnative-pg/postgresql:18.1`
  • backend: OCI Object Storage (S3-compat)

`Cluster.status` reports:

``` firstRecoverabilityPoint: "" lastSuccessfulBackup: "" lastFailedBackup: "" lastArchivedWAL: "" lastArchivedWALTime: ""

conditions: ContinuousArchiving: True (ContinuousArchivingSuccess) LastBackupSucceeded: True (LastBackupSucceeded) ```

`ObjectStore.status` has the recovery-window data:

```yaml status: serverRecoveryWindow: : firstRecoverabilityPoint: 2026-05-07T15:45:10Z lastSuccessfulBackupTime: 2026-05-08T02:01:01Z ```

But there's no `lastArchivedWAL`/`lastArchivedWALTime` anywhere — neither on `Cluster` nor on `ObjectStore` — even though `pg_stat_archiver` and the bucket itself confirm WALs are landing every ~5 min.

Empirically validated the archive chain is healthy via a full PITR drill (timeline 3 → 4 fork, sentinel-row pre/post targetTime, 230 s RTO, 1213=1213 row count match), so this is purely a status-surface gap, not a data-loss bug. Would love to see #8780 mirrored into `ObjectStore.status` and/or back-propagated to `Cluster.status` for parity with the in-tree barman implementation.

grkml avatar May 08 '26 03:05 grkml