Re: suboverflowed subtransactions concurrency performance optimize - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: suboverflowed subtransactions concurrency performance optimize
Date
Msg-id CAFiTN-vwCOk0KgZmz-_bLRru1G_-6+Vp2YHzSBaoVL-HacuyAw@mail.gmail.com
Whole thread Raw
In response to Re: suboverflowed subtransactions concurrency performance optimize  (Simon Riggs <simon.riggs@enterprisedb.com>)
Responses Re: suboverflowed subtransactions concurrency performance optimize
Re: suboverflowed subtransactions concurrency performance optimize
List pgsql-hackers
On Tue, Nov 30, 2021 at 5:49 PM Simon Riggs
<simon.riggs@enterprisedb.com> wrote:

> transam.c uses a single item cache to prevent thrashing from repeated
> lookups, which reduces problems with shared access to SLRUs.
> multitrans.c also has similar.
>
> I notice that subtrans. doesn't have this, but could easily do so.
> Patch attached, which seems separate to other attempts at tuning.

Yeah, this definitely makes sense.

> 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?

-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Failed transaction statistics to measure the logical replication progress
Next
From: Masahiko Sawada
Date:
Subject: Re: Skipping logical replication transactions on subscriber side