Initial load from standby in logical replication.

From: Radoslav Nedyalkov <rnedyalkov(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Initial load from standby in logical replication.
Date: 2019-01-31 13:55:39
Message-ID: CANhtRibUuueF_xdSrP7MNwY42Ek=AH3-ogVxwd6mg87WGL+aBQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,
We want to setup a logical replica with initial load from physical standby.
(all pg10.5)
Basically what we tested is:
1.on the master: create publication and logical slot.
2.on the standby: pause the stanby. (lsn from 1. is already replayed).
3.on the standby: get last replayed lsn, pg_last_wal_replay_lsn().
4.export/import the data into the logical replica.
5.on the logical replica: create subscription
with pg_replication_origin_advance'd to the lsn from 3.
6.on the logical replica: enable subscription.

On a test setup with some bulk inserts results are encouraging.
Still we're not that confident. Does the procedure looks okay?
What if standby is paused at COMMIT lsn?

Thanks!
Radoslav Nedyalkov

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Achilleas Mantzios 2019-01-31 14:08:33 Re: Initial load from standby in logical replication.
Previous Message Ron 2019-01-31 13:48:51 Re: problem