From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com> |
Cc: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Pengchengliu <pengchengliu(at)tju(dot)edu(dot)cn>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: suboverflowed subtransactions concurrency performance optimize |
Date: | 2021-12-03 11:58:12 |
Message-ID: | CAFiTN-tJgJUXJa86PbJtjBUGcESL0xb12ZJ1Unvd_yCCiQ-M1A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Dec 3, 2021 at 5:00 PM Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com> wrote:
>
> On Fri, 3 Dec 2021 at 01:27, Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
> > > On review, I think it is also possible that we update subtrans ONLY if
> > > someone uses >PGPROC_MAX_CACHED_SUBXIDS.
> > > This would make subtrans much smaller and avoid one-entry-per-page
> > > which is a major source of cacheing.
> > > This would means some light changes in GetSnapshotData().
> > > Let me know if that seems interesting also?
> >
> > Do you mean to say avoid setting the sub-transactions parent if the
> > number of sun-transactions is not crossing PGPROC_MAX_CACHED_SUBXIDS?
> > But the TransactionIdDidCommit(), might need to fetch the parent if
> > the transaction status is TRANSACTION_STATUS_SUB_COMMITTED, so how
> > would we handle that?
>
> TRANSACTION_STATUS_SUB_COMMITTED is set as a transient state during
> final commit.
> In that case, the top-level xid is still in procarray when nsubxids <
> PGPROC_MAX_CACHED_SUBXIDS
> so we need not consult pg_subtrans in that case, see step 4 of.
> TransactionIdIsInProgress()
Okay I see, that there is a rule that before calling
TransactionIdDidCommit(), we must consult TransactionIdIsInProgress()
for non MVCC snapshot or XidInMVCCSnapshot(). Okay so now I don't
have this concern, thanks for clarifying. I will think more about
this approach from other aspects.
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2021-12-03 12:33:14 | Re: parallel vacuum comments |
Previous Message | Simon Riggs | 2021-12-03 11:30:18 | Re: suboverflowed subtransactions concurrency performance optimize |