public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kyotaro Horiguchi <[email protected]>
To: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Subject: Re: Error "initial slot snapshot too large" in create replication slot
Date: Tue, 13 Sep 2022 16:30:06 +0900 (JST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<CAFiTN-tdHJ1ereRR=jXJgcBr2rywwNrU9y6Jf0cGGv8cmTjWJQ@mail.gmail.com>
<[email protected]>
At Tue, 13 Sep 2022 16:10:59 +0900 (JST), Kyotaro Horiguchi <[email protected]> wrote in
> At Tue, 13 Sep 2022 12:08:18 +0530, Dilip Kumar <[email protected]> wrote in
> > On Tue, Sep 13, 2022 at 11:52 AM Kyotaro Horiguchi
> > <[email protected]> wrote:
> > > That function is called after the SnapBuild reaches
> > > SNAPBUILD_CONSISTENT state ,or SnapBuildInitialSnapshot() rejects
> > > other than that state. That is, IIUC the top-sub relationship of all
> > > the currently running transactions is fully known to reorder buffer.
> > > We need a comment about that.
> >
> > I don't think this assumption is true, any xid started after switching
> > to the SNAPBUILD_FULL_SNAPSHOT and before switching to the
> > SNAPBUILD_CONSISTENT, might still be in progress so we can not
> > identify whether they are subxact or not from reorder buffer.
>
> Yeah, I misunderstood that the relationship is recorded earlier
> (how?). Thus it is not reliable in the first place.
>
> I agree that the best way is oversized xip.
>
>
> By the way, I feel that "is >= than" is redundant or plain wrong..
By the way GetSnapshotData() does this:
> snapshot->subxip = (TransactionId *)
> malloc(GetMaxSnapshotSubxidCount() * sizeof(TransactionId));
...
> if (!snapshot->takenDuringRecovery)
...
> else
> {
> subcount = KnownAssignedXidsGetAndSetXmin(snapshot->subxip, &xmin,
> xmax);
It is possible that the subxip is overrun. We need to expand the array
somehow. Or assign the array of the size (GetMaxSnapshotXidCount() +
GetMaxSnapshotSubxidCount()) for takenDuringRecovery snapshots.
(I feel deja vu..)
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
view thread (30+ 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: 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