parallel PITR for HA setup

From: magodo <wztdyl(at)sina(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: parallel PITR for HA setup
Date: 2018-10-11 10:08:31
Message-ID: aab38d6dd85929a9ab2b15132431e8b538599b42.camel@sina.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hello,

I have a HA setup, a standby following a primary.

At beginning, when I do PITR for it, I just recover the primary the
first, then remake the standby by doing a basebackup against primary
and restart the standby with recovery.conf properly.

This works well, however, it takes long time when I have tons of data
to recover. Then I starts to find out how to do parallel PITR for both
clusters and re-establish the relationship between them. Then I find an
issue, after recovery for both clusters, they are at same LSN. Then on
the standby, I need to create a recovery.conf file, and restart it,
which will end up with standby's LSN newer than the current flushed one
on primary.

My solution to this problem is to do a restart also on primary. I
wonder if this is a proper way.

Thank you in advance!
---
Magodo

Browse pgsql-general by date

  From Date Subject
Next Message Mike Martin 2018-10-11 10:26:08 Advice on logging strategy
Previous Message Abhishek Tripathi 2018-10-11 09:49:13 Fwd: Want to acquire lock on tables where primary of one table is foreign key on othere