At Tue, 13 Sep 2022 16:15:34 +0900 (JST), Kyotaro Horiguchi 
<horikyota....@gmail.com> wrote in 
> At Tue, 13 Sep 2022 15:45:07 +0900 (JST), Kyotaro Horiguchi 
> <horikyota....@gmail.com> wrote in 
> > At Mon, 12 Sep 2022 14:51:56 -0700, Andres Freund <and...@anarazel.de> 
> > wrote in 
> > > This sees a tad misleading - the previous snapshot wasn't borken, right?
> > 
> > I saw it kind of broken that ->xip contains sub transactions.  But I
> > didn't meant it's broken by "correct". Is "proper" suitable there?
> 
> No. It's not broken if it is takenDuringRecovery.  So this flag can be
> used to notify that xip can be oversized.
> 
> I realized that rbtxn_is_known_subxact is not reliable. I'm
> redirecting to oversized xip. Pleas wait for a while.

However, the reader of saved snapshots (ImportSnapshot) has the
restriction that

>       if (xcnt < 0 || xcnt > GetMaxSnapshotXidCount())
>               ereport(ERROR,

and

>               if (xcnt < 0 || xcnt > GetMaxSnapshotSubxidCount())
>                       ereport(ERROR,
 (this xid is subxcnt)

And ExportSnapshot repalces oversized subxip with overflowed.

So even when GetSnapshotData() returns a snapshot with oversized
subxip, it is saved as just "overflowed" on exporting. I don't think
this is the expected behavior since such (no xip and overflowed)
snapshot no longer works.

On the other hand, it seems to me that snapbuild doesn't like
takenDuringRecovery snapshots.

So snapshot needs additional flag signals that xip is oversized and
all xid are holded there. And also need to let takenDuringRecovery
suggest subxip is oversized.


regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


Reply via email to