Re: Bug in wait time when waiting on nested subtransaction - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Bug in wait time when waiting on nested subtransaction
Date
Msg-id CANbhV-GCPReVnHdQt_x38tDPrd1D86b3rS_BE5fLxeeO-j9Xkg@mail.gmail.com
Whole thread Raw
In response to Re: Bug in wait time when waiting on nested subtransaction  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Mon, 28 Nov 2022 at 21:10, Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Mon, Nov 28, 2022 at 3:01 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > One thing we need to be pretty careful of here is to not break the
> > promise of atomic commit.  At topmost commit, all subxacts must
> > appear committed simultaneously.  It's not quite clear to me whether
> > we need a similar guarantee in the rollback case.  It seems like
> > we shouldn't, but maybe I'm missing something, in which case maybe
> > the current behavior is correct?
>
> In short, I think Simon is right that there's a problem and right
> about which commit caused it, but I'm not sure what I think we ought
> to do about it.

I'm comfortable with ignoring it, on the basis that it *is* a
performance optimization, but I suggest we keep the test (with
modified output) and document the behavior, if we do.

The really big issue is the loss of performance we get from having
subtrans point only to its immediate parent, which makes
XidInMVCCSnapshot() go really slow in the presence of lots of
subtransactions. So ignoring the issue on this thread will open the
door for the optimization posted for this patch:
https://commitfest.postgresql.org/40/3806/

--
Simon Riggs                http://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Introduce a new view for checkpointer related stats
Next
From: Vik Fearing
Date:
Subject: Re: Patch: Global Unique Index