public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andres Freund <[email protected]>
To: Amit Khandekar <[email protected]>
Cc: tushar <[email protected]>
Cc: Petr Jelinek <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Craig Ringer <[email protected]>
Cc: Petr Jelinek <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: Minimal logical decoding on standbys
Date: Thu, 30 May 2019 07:17:23 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAJ3gD9f11mhBURoOTAEJXoFAUF74BzSz=XRjL01EBB3SkLdVHA@mail.gmail.com>
References: <[email protected]>
	<CAJ3gD9c9EP6CGB+hGoDJKeVYQG67mtWcgVRhOAhVhh44hOBkmw@mail.gmail.com>
	<[email protected]>
	<CAJ3gD9dKw8OEDjwbTmQ6e3-VGY64keNRxycHF4roJpsqhtssuw@mail.gmail.com>
	<[email protected]>
	<CAJ3gD9dv60f-QE21OQkZh3Wc1MCXrkVg=Yz5oPLzAmj-DQAeBw@mail.gmail.com>
	<CAJ3gD9fJdB6yZ5SL_h7GvVZxCLA7kXVpNzwjvggPge7kHZ1Bsw@mail.gmail.com>
	<CAJ3gD9d3uyK2iaO+PD=64HvOBerZPz3JyaPc6qF=kVZ_jGvgeQ@mail.gmail.com>
	<[email protected]>
	<CAJ3gD9f11mhBURoOTAEJXoFAUF74BzSz=XRjL01EBB3SkLdVHA@mail.gmail.com>

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





view thread (196+ messages)  latest in thread

reply

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Minimal logical decoding on standbys
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox