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

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: Error "initial slot snapshot too large" in create replication slot
Дата
Msg-id 20220131.143158.896330709668373625.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: Error "initial slot snapshot too large" in create replication slot  (Dilip Kumar <dilipbalaut@gmail.com>)
Список pgsql-hackers
At Tue, 2 Nov 2021 16:40:39 +0530, Dilip Kumar <dilipbalaut@gmail.com> wrote in 
> On Tue, Oct 19, 2021 at 2:25 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
> >
> > On Tue, Oct 12, 2021 at 11:30 AM Dilip Kumar <dilipbalaut@gmail.com> wrote:
> > >
> > > On Tue, Oct 12, 2021 at 10:35 AM Kyotaro Horiguchi
> > > <horikyota.ntt@gmail.com> wrote:
> > > >
> > > > At Tue, 12 Oct 2021 13:59:59 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.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.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: Make relfile tombstone files conditional on WAL level
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Spelling change in LLVM 14 API