Declarative pausing and resuming v1
The declarative pausing and resuming feature enables saving CPU power by removing the database pods while keeping the database PVCs.
Declarative pausing and resuming leverages the hibernation functionality available for EDB Postgres for Kubernetes. For additional depth and an explanation of how hibernation works, see the Postgres for Kubernetes documentation on declarative hibernation.
Request pause by adding the k8s.pgd.enterprisedb.io/pause
annotation in the desired PGD group.
For example:
After a few seconds, the requested PGD group will be in paused state, with all the database pods removed:
To resume a paused PGD group, set the annotation to off
.
Remember to add the --overwrite
flag:
In a few seconds, you should see the nodes start resuming, and the pods to be re-created.
There are some requirements before the pause annotation can put the PGD group on Pause. Ideally, the PGD Group should be in Healthy state. Alternatively, if all the data nodes in the PGD Group are healthy at the individual level, Pause can also be initiated.