Re: Error "initial slot snapshot too large" in create replication slot

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Error "initial slot snapshot too large" in create replication slot
Date: 2021-11-02 11:10:39
Message-ID: CAFiTN-ui+vtbUq_-3+SzT4KU_=iAJz7_-en+_tnPz-p34h76mQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 19, 2021 at 2:25 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
> On Tue, Oct 12, 2021 at 11:30 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> >
> > On Tue, Oct 12, 2021 at 10:35 AM Kyotaro Horiguchi
> > <horikyota(dot)ntt(at)gmail(dot)com> wrote:
> > >
> > > At Tue, 12 Oct 2021 13:59:59 +0900 (JST), Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> 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.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
v3-0001-Allow-overflowed-snapshot-when-creating-logical-r.patch text/x-patch 5.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Himanshu Upadhyaya 2021-11-02 11:19:57 Should we support new definition for Identity column : GENERATED BY DEFAULT ON NULL?
Previous Message Daniel Gustafsson 2021-11-02 11:00:15 Re: should we enable log_checkpoints out of the box?