Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions internal/cnpgi/common/wal.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,11 @@ func isStreamingAvailable(cluster *cnpgv1.Cluster, podName string) bool {
return false
}

// First instance of a new cluster: streaming is not available yet
if cluster.Status.CurrentPrimary == "" {
return false
}

// Easy case: If this pod is a replica, the streaming is always available
if cluster.Status.CurrentPrimary != podName {
return true
Expand Down