fix: inject barman sidecar in replica clusters bootstrapped with pg_basebackup#965
Open
leonardoce wants to merge 3 commits into
Open
fix: inject barman sidecar in replica clusters bootstrapped with pg_basebackup#965leonardoce wants to merge 3 commits into
leonardoce wants to merge 3 commits into
Conversation
a336b5a to
55a47cf
Compare
jbattiato
approved these changes
Jun 17, 2026
55a47cf to
70dd50f
Compare
armru
approved these changes
Jun 18, 2026
…asebackup Replica clusters that use `pg_basebackup` as the bootstrap method and stream WAL from an object store were not getting the barman sidecar injected, causing WAL restore to fail silently. These clusters are now handled correctly. Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
…up replicas The sidecar injected into pg_basebackup replica clusters ignored the instanceSidecarConfiguration (resources, logLevel, additionalContainerArgs) of the replica-source ObjectStore: collectSidecarResourcesForPod and collectAdditionalInstanceArgs only handled the cluster and recovery object stores. Log-shipping replicas masked this because their recovery and replica source object stores coincide; pg_basebackup replicas only set ReplicaSourceBarmanObjectName, so the configuration was silently dropped (the sidecar ran with no additional args and the default log level). Handle ReplicaSourceBarmanObjectName in both helpers, documenting the store precedence (Barman > Recovery > ReplicaSource), and fix the misleading comment on the recovery branch. Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Add config-package tests exercising the parse path the pg_basebackup replica fix lives in: NewFromCluster must derive ReplicaSourceBarmanObjectName from the external cluster plugin (while leaving the backup and recovery object stores empty) and Validate must accept it. Also assert that a replica source backed by a different plugin is ignored. Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
70dd50f to
2d64d34
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replica clusters that use
pg_basebackupas the bootstrap method and stream WAL from an object store were not getting the barman sidecar injected, causing WAL restore to fail silently. These clusters are now handled correctly.