zalando / zalando/postgres-operator

Point in time recovery: Recovery target is unreachable in combination with logging_collector = off

Open
#2,168 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

PostgreSQL 13 has changed the behavior when the recovery target is unreachable while cloning clusters. A fix has been implemented such that the behavior remains as in previous versions (see Spilo pull request)

However, this fix relies on screening the log files - something that doesn't work when logging_collector is set to off (e.g. because logs shall be collected by Promtail).

My current workaround: Set logging_collector to on during cloning and switch back back to off later

Since this cost me half a day, this issue serves two purposes :)

  1. maybe someone else has the same issue and it might be easier to find the solution in an issue in the postgres-operator repository instead of a comment in a pull request of the spilo repository
  2. I would suggest to add a brief note in the documentation of the postgres-operator (e.g. in https://postgres-operator.readthedocs.io/en/latest/user/#how-to-clone-an-existing-postgresql-cluster)

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 cloning guidance at user/#how-to-clone-an-existing-postgresql-cluster and review the linked Spilo pull request for the recovery-target behavior. Document the limitation when logging_collector is off, including the workaround described here; done means users can find and understand this caveat without searching the Spilo issue thread.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.