Skip to content

Commit 6607a88

Browse files
authored
fix: guard for nil pgDataImageInfo in major version upgrades reconciler (cloudnative-pg#7602)
Closes cloudnative-pg#7601 Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
1 parent 3c5df07 commit 6607a88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/reconciler/majorupgrade/reconciler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func Reconcile(
6969
contextLogger.Error(err, "Unable to retrieve the requested PostgreSQL version")
7070
return nil, err
7171
}
72-
if requestedMajor <= cluster.Status.PGDataImageInfo.MajorVersion {
72+
if cluster.Status.PGDataImageInfo == nil || requestedMajor <= cluster.Status.PGDataImageInfo.MajorVersion {
7373
return nil, nil
7474
}
7575

0 commit comments

Comments
 (0)