zalando / postgres-operator

Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
https://postgres-operator.readthedocs.io/
MIT License
4.11k stars 949 forks source link

Recovery not moving forward after changing clone timestamp #2640

Open yelhouti opened 1 month ago

yelhouti commented 1 month ago

Please, answer some short questions which should help us to understand your problem / question better?

I truncated the wrong schema in a production database (as smart people do) and I am trying to do a point-intime recovery. I was able to recreate a backup cluster on a different namespace, and I am to see that data. Want I want to do is make sure that no data is missed between the time I recovered to the time I truncated. I can't figure out the exact time I did the truncate using pg_waldump so I decided to step one second by modifying clone.timestamp 1 second at a time unless I can't find the data. But it seems like changing the timestamp and re-applying the crd doesn't d the trick. And deleting and recreating the crd, takes too long because it needs to re-download and extract the base backup...

Is there a smarter way to creep forward until I reach the correct timestamp ? Could the operator be fixed to do that as one would expect ?