zalando / zalando/postgres-operator

Select specific timeline during restore / clone possible?

Open
#1,832 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question spilo
Dominant language
Go
Stars
5.2k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
3

Description

Hello,

I have the question if there is any possibility to select a specific timeline one wants to restore to in the clone section of the postgres CRD. I haven't found anything regarding timelines in the documentation (also not in the Spilo repo). I assume, that because a restore should be done as a clone, you see no need for implementing this. But I'm not sure.
Nevertheless, although it is not documented, it's possible to restore a cluster / database as a replacement of an existing cluster by deleting it before, then doing a clone with all the same settings in the CRD and specifying a point in time to recover to. A new timeline will be created after the restore is finished. In some complex restore scenarios it might then be needed to specify a timeline to restore as a target.

In the postgresql.conf the recovery settings always look like this:

recovery_target_action = 'promote'
recovery_target_time = '2022-03-11T10:46:00+00:00'
recovery_target_timeline = 'latest'
restore_command = 'envdir "/run/etc/wal-e.d/env-clone-haberkernp-backup-test" /scripts/restore_command.sh "%f" "%p"'
  • Which image of the operator are you using?
    registry.opensource.zalan.do/acid/postgres-operator:v1.7.1
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? [AWS K8s | GCP ... | Bare Metal K8s]
    Selfthosted K8s
  • Are you running Postgres Operator in production? [yes | no]
    yes
  • Type of issue? [Bug report, question, feature request, etc.]
    question, maybe feature request

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the clone section of the PostgreSQL CRD and the documentation, then compare the generated postgresql.conf recovery settings. Determine whether a specific recovery_target_timeline can be selected during clone restore; done means the capability is either documented clearly or supported with an explicit configuration path.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, postgresql
Domain
databases, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.