MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / GetPgCtlTimeoutForPromotion

Method GetPgCtlTimeoutForPromotion

api/v1/cluster_funcs.go:841–847  ·  view source on GitHub ↗

GetPgCtlTimeoutForPromotion returns the timeout that should be waited for an instance to be promoted to primary. As default, DefaultPgCtlTimeoutForPromotion is big enough to simulate an infinite timeout

()

Source from the content-addressed store, hash-verified

839// GetPgCtlTimeoutForPromotion returns the timeout that should be waited for an instance to be promoted
840// to primary. As default, DefaultPgCtlTimeoutForPromotion is big enough to simulate an infinite timeout
841func (cluster *Cluster) GetPgCtlTimeoutForPromotion() int32 {
842 timeout := cluster.Spec.PostgresConfiguration.PgCtlTimeoutForPromotion
843 if timeout == 0 {
844 return DefaultPgCtlTimeoutForPromotion
845 }
846 return timeout
847}
848
849// IsReusePVCEnabled check if in a maintenance window we should reuse PVCs
850func (cluster *Cluster) IsReusePVCEnabled() bool {

Callers 1

PromoteAndWaitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected