On Wed, Nov 16, 2022 at 8:41 AM Simon Riggs <simon.ri...@enterprisedb.com> wrote: > > > No, that's not what XidInMVCCSnapshot does. If snapshot->suboverflowed > > is set (ie, somebody somewhere/somewhen overflowed), then it does > > SubTransGetTopmostTransaction and searches only the xips with the result. > > This behavior requires that all live subxids be correctly mapped by > > SubTransGetTopmostTransaction, or we'll draw false conclusions. > > Your comments are correct wrt to the existing coding, but not to the > patch, which is coded as described and does not suffer those issues. >
This will work because of these two changes in patch 1) even though the snapshot is marked "overflow" we will include all the subtransactions information in snapshot->subxip. 2) As Simon mentioned in XidInMVCCSnapshot(), first, we search the subxip cache in snapshot->subxip, and only if it is not found in that we will look into the SLRU. So now because of 1) we will always find any concurrent subtransaction in "snapshot->subxip". -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com