Description:
I did a manual backup by creating a PerconaPGBackup object. Then, I deleted a table from the database and tried to restore it manually into the cluster which is running by creating a PerconaPGRestore object. It successfully ran the first time, but, after running it more than once, I am getting an error in the operator logs- “Waiting for another restore to finish”.
Steps to Reproduce:
- Create a cluster with 1 replica and set repo3 for backup to GCS. There is no pmm and no pgBouncer.
- Fill some data in the Postgres in a table.
- Create a PerconaPGBackup kind which backs up the database and then apply it. This backs up the data created in step 2 to the GCS bucket.
- Delete the data created in step 2 from the Postgres.
- Restore the database in the current cluster using a PerconaPGRestore object. This should be the same as that in step 2.
- After the restore is completed and the Postgres instance pod is running again, delete the data which was restored in step 5.
- Create another PerconaPGRestore object and apply it. We can see an error in the operator logs.
Version:
2.2.0
Using the docker image- percona/percona-postgresql-operator:2.2.0-ppg14-*
Logs:
time=“2023-12-21T11:45:17Z” level=info msg=“Waiting for another restore to finish” PerconaPGRestore=postgres-operator/manual-restore controller=perconapgrestore controllerGroup=pgv2.percona.com controllerKind=PerconaPGRestore name=manual-restore namespace=postgres-operator reconcileID=3969fd5a-9ddd-4c6d-ad36-69e0b8dcfa6b request=postgres-operator/manual-restore version=
time=“2023-12-21T11:45:22Z” level=info msg=“Waiting for another restore to finish” PerconaPGRestore=postgres-operator/manual-restore controller=perconapgrestore controllerGroup=pgv2.percona.com controllerKind=PerconaPGRestore name=manual-restore namespace=postgres-operator reconcileID=f3089a46-5ee8-42b0-b441-bef360b029a0 request=postgres-operator/manual-restore version=
…
(Repeats indefinitely)
Expected Result:
A new pod is created which restores the data.
Actual Result:
Nothing happens except the logs in the operator.