public inbox for [email protected]  
help / color / mirror / Atom feed
From: Drouvot, Bertrand <[email protected]>
To: Amit Kapila <[email protected]>
Cc: shveta malik <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: Hayato Kuroda (Fujitsu) <[email protected]>
Cc: Bharath Rupireddy <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Bruce Momjian <[email protected]>
Cc: Ashutosh Sharma <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: pgsql-hackers <[email protected]>
Cc: Ajin Cherian <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Subject: Re: Synchronizing slots from primary to standby
Date: Fri, 27 Oct 2023 17:30:20 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAA4eK1Kb-AooTLnnrzPdSfM6NfPyR2Ga_Z+ZGX+KRV0Q5_3utA@mail.gmail.com>
References: <CAJpy0uC+2agRtF3H=n-hW5JkoPfaZkjPXJr==y3_PRE04dQvhw@mail.gmail.com>
	<CAA4eK1JVey4DRfSAEHfF1kgdfY4hbb1LEhCPGexKwYe2Sm1zVQ@mail.gmail.com>
	<[email protected]>
	<CAJpy0uD5nmxXKDweoLHMKaSEiXs2TnMagi9BtqDp92GFzAfgBw@mail.gmail.com>
	<CAJpy0uD6c3SB+UBG7ULTDydb=xUDfG4EAa6jkwaCVTZFxwrN+w@mail.gmail.com>
	<CAHut+PuP_Hw5WTYCBBKUMRu6M47y1tzB-N469pqxejfh0jTu5Q@mail.gmail.com>
	<CAJpy0uBQB32g0Mcf2yo+cscUF_8L_QEOH-ZwVgeV3eWmn7603A@mail.gmail.com>
	<CAA4eK1J6BqO5=ueFAQO+aYyHLaU-oCHrrVFJqHS-i0Ce9aPY2w@mail.gmail.com>
	<CAJpy0uAb7j2ZNVnm_Mvt+ofCvK1Wh17-d-Jm5ZCq=6V0k327xA@mail.gmail.com>
	<[email protected]>
	<CAJpy0uCMptLCgg-fWWTEcgtRfXAeObaXLUw=i2L4vhPRVXGJMA@mail.gmail.com>
	<[email protected]>
	<CAJpy0uCQQb=UK3h5RWO4_r_MVuLKEGZ34hYrqGmDm+3zVvcJgQ@mail.gmail.com>
	<[email protected]>
	<CAA4eK1Kb-AooTLnnrzPdSfM6NfPyR2Ga_Z+ZGX+KRV0Q5_3utA@mail.gmail.com>

Hi,

On 10/27/23 10:35 AM, Amit Kapila wrote:
> On Wed, Oct 25, 2023 at 3:15 PM Drouvot, Bertrand
> 
> I think even if we provide such an API, we need to have logic to get
> the slots from the primary and create them.

Yeah, my idea was to add an API (in addition to what is already in place).

> Say, even if the user used
> the APIs, there may still be some new slots that the sync worker needs
> to create. 

Right.

> I think it might be better to provide a view for users to
> view the current state of sync. For example, in the above case, we can
> say "waiting for the primary to advance remote LSN" or something like
> that.

We are already displaying the wait event "ReplSlotsyncPrimaryCatchup" in pg_stat_activity
so that might already be enough?

My main idea was to be able to manually create/sync logical_slot2 in the test case described in [1]
without waiting for activity on logical_slot1.

But another (better?) option might be to change our current algorithm during slot creation on the
standby? (to avoid an "active" slot having to wait on a "inactive" one, like described in [1]).

[1]: https://www.postgresql.org/message-id/afe4ab6c-dde3-48ea-acd8-6f6052c7b8fd%40gmail.com

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com






view thread (3+ 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], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Synchronizing slots from primary to standby
  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