Re: Minimal logical decoding on standbys

From: Andres Freund <andres(at)anarazel(dot)de>
To: Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>
Cc: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Minimal logical decoding on standbys
Date: 2019-05-30 14:17:23
Message-ID: 20190530141723.ox5y4wda6alvo4uj@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2019-05-30 19:46:26 +0530, Amit Khandekar wrote:
> @@ -1042,7 +1042,8 @@ ReplicationSlotReserveWal(void)
> if (!RecoveryInProgress() && SlotIsLogical(slot))
> {
> ....
> }
> else
> {
> - restart_lsn = GetRedoRecPtr();
> + restart_lsn = SlotIsLogical(slot) ?
> + GetXLogReplayRecPtr(&ThisTimeLineID) : GetRedoRecPtr();
>
> But then when I do pg_create_logical_replication_slot(), it hangs in
> DecodingContextFindStartpoint(), waiting to find new records
> (XLogReadRecord).

But just till the primary has logged the necessary WAL records? If you
just do CHECKPOINT; or such on the primary, it should succeed quickly?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-05-30 14:18:21 Re: Server crash due to assertion failure in CheckOpSlotCompatibility()
Previous Message Dmitry Dolgov 2019-05-30 14:17:14 Re: [HACKERS] [PATCH] Generic type subscripting