From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Julien Tachoires <julmon(at)gmail(dot)com>, Japin Li <japinli(at)hotmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: SUBTRANS: Minimizing calls to SubTransSetParent() |
Date: | 2022-11-16 04:26:15 |
Message-ID: | CAFiTN-sGAT=c0q7AKewtxmYaDWAfjmUzn5wQckt=y47s5jbmcw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Nov 16, 2022 at 8:41 AM Simon Riggs
<simon(dot)riggs(at)enterprisedb(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2022-11-16 04:33:08 | Re: Hash index build performance tweak from sorting |
Previous Message | Nathan Bossart | 2022-11-16 04:24:16 | Re: Suppressing useless wakeups in walreceiver |