Why should we have automatic backups via jobs in postgres? #1690

Why does Postgres create a backup job for me in a pvc of the same size as the space I used when creating the database in Kuber when creating the database? I really don’t need this repo1 that was created when i started the postgresSQL cluster in UI
postgresql-qii-repo1 Bound pvc-74ebed1a-5ce8-43b2-b3fb-3ed89adfe231 1Gi RWO
And also we don’t have any mechanism to delete this job that has been completed?

Hi @ahmad_taknet

Thank you for reaching out.

If I understand correctly, Do you want to disable the creation of repo host while creating Postgres cluster with Everest ?

And also we don’t have any mechanism to delete this job that has been completed?

Can you please confirm which job are you referring to ?

Yes. As soon as the postgres cluster is created, a perconapgbackups named repo1 and a job named postgresql-mwd-backup-xfcq and consequently a pod named postgresql-mwd-backup-xfcq-xdjp9 are created. This repo1 creates a pvc named postgresql-mwd-repo1 and has a volume of the size of my database, which is not what I want. All this happens automatically for backup. I want this to happen only by creating a dedicated backupstorage. And the mentioned job contains the following command:
value: --stanza=db --repo=1 --annotation="percona.com/backup-job-type"="replica-create"

Hi @ahmad_taknet, until Percona Operator for PostgreSQL v2.7.0 we were not allowed to create a DB cluster with backups disabled. This was because a backup was required in order to get replication going between nodes. Because of this limitation, we had to resort to creating a PVC repo that could be used for the initial deployment.

Now that the Percona Operator for PostgreSQL allows us to disable backups entirely, we will soon remove this unnecessary PVC repo. However, we are currently blocked by a bug in the operator. As soon as that bug is fixed we will remove the PVC and backup job.

1 Like