public inbox for [email protected]  
help / color / mirror / Atom feed
From: Kyotaro Horiguchi <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: Error "initial slot snapshot too large" in create replication slot
Date: Mon, 31 Jan 2022 14:31:58 +0900 (JST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAFiTN-ui+vtbUq_-3+SzT4KU_=iAJz7_-en+_tnPz-p34h76mQ@mail.gmail.com>
References: <CAFiTN-sARczQgig5riHUAQsTYZxqF-iP70gBFfq8E3n0oHjFjg@mail.gmail.com>
	<CAFiTN-sVLdkdBzJFr2+b9iPvQ_MfWYQ2mhDAXP=cpbmyw-evNg@mail.gmail.com>
	<CAFiTN-ui+vtbUq_-3+SzT4KU_=iAJz7_-en+_tnPz-p34h76mQ@mail.gmail.com>

At Tue, 2 Nov 2021 16:40:39 +0530, Dilip Kumar <[email protected]> wrote in 
> On Tue, Oct 19, 2021 at 2:25 PM Dilip Kumar <[email protected]> wrote:
> >
> > On Tue, Oct 12, 2021 at 11:30 AM Dilip Kumar <[email protected]> wrote:
> > >
> > > On Tue, Oct 12, 2021 at 10:35 AM Kyotaro Horiguchi
> > > <[email protected]> wrote:
> > > >
> > > > At Tue, 12 Oct 2021 13:59:59 +0900 (JST), Kyotaro Horiguchi <[email protected]> wrote in
> > > > > So I came up with the attached version.
> > > >
> > > > Sorry, it was losing a piece of change.
> > >
> > > Yeah, at a high level this is on the idea I have in mind, I will do a
> > > detailed review in a day or two.  Thanks for working on this.
> >
> > While doing the detailed review, I think there are a couple of
> > problems with the patch,  the main problem of storing all the xid in
> > the snap->subxip is that once we mark the snapshot overflown then the
> > XidInMVCCSnapshot, will not search the subxip array, instead it will
> > fetch the topXid and search in the snap->xip array.
> 
> I missed that you are marking the snapshot as takenDuringRecovery so
> your fix looks fine.
> 
> Another issue is
> > that the total xids could be GetMaxSnapshotSubxidCount()
> > +GetMaxSnapshotXidCount().
> >
> 
> I have fixed this, the updated patch is attached.

Mmm. The size of the array cannot be larger than the numbers the
*Connt() functions return.  Thus we cannot attach the oversized array
to ->subxip.  (I don't recall clearly but that would lead to assertion
failure somewhere..)

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center






view thread (5+ 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]
  Subject: Re: Error "initial slot snapshot too large" in create replication slot
  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