Skip to content

Conversation

marceloneppel
Copy link
Member

@marceloneppel marceloneppel commented Sep 29, 2023

Issue

If we have a cluster of two or more units, scale it down to 1 unit, create a backup, restore the backup and scale up back again, the replication stop working due to reuse of the storage.

Solution

In that situation, as we see a huge replication lag, we need to reinitialise the replicas.

Fixes #262.

@marceloneppel marceloneppel marked this pull request as ready for review September 29, 2023 19:02
Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will it work on demo installations if there are no traffic?

@marceloneppel
Copy link
Member Author

LGTM, will it work on demo installations if there are no traffic?

Yes. The lag appears even on a demo installation due to the divergence in the timelines.

@dragomirp dragomirp merged commit 59d90f2 into main Oct 2, 2023
@dragomirp dragomirp deleted the dpe-2657-fix-replication-after-restore branch October 2, 2023 11:59
BON4 pushed a commit to BON4/postgresql-k8s-operator that referenced this pull request May 20, 2024
* Fix replication after restore

* Fix words and format code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After restoring a backup, replication doesn't work

3 participants