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
()
| 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 |
| 841 | func (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 |
| 850 | func (cluster *Cluster) IsReusePVCEnabled() bool { |