From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Initial load from standby in logical replication.
Date: Thu, 31 Jan 2019 16:08:33 +0200
Message-ID: <0854e3da-cbe7-e513-b571-de4eae619afd@matrix.gatewaynet.com> (raw)
In-Reply-To: <CANhtRibUuueF_xdSrP7MNwY42Ek=AH3-ogVxwd6mg87WGL+aBQ@mail.gmail.com>
References: <CANhtRibUuueF_xdSrP7MNwY42Ek=AH3-ogVxwd6mg87WGL+aBQ@mail.gmail.com>
On 31/1/19 3:55 μ.μ., Radoslav Nedyalkov wrote:
> 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?
Who is gonna consume data from the primary's replication slot? If there is no subscriber connected and reading data, then the primary will think that the subscriber is down and will accumulate WALs
till some replication client is connected to it (which will not happen since the subscriber points to the standby).
>
> Thanks!
> Radoslav Nedyalkov
>
>
>
>
>
>
--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: achill@matrix.gatewaynet.com
Subject: Re: Initial load from standby in logical replication.
In-Reply-To: <0854e3da-cbe7-e513-b571-de4eae619afd@matrix.gatewaynet.com>
References: <CANhtRibUuueF_xdSrP7MNwY42Ek=AH3-ogVxwd6mg87WGL+aBQ@mail.gmail.com> <0854e3da-cbe7-e513-b571-de4eae619afd@matrix.gatewaynet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox