Re: suboverflowed subtransactions concurrency performance optimize

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: suboverflowed subtransactions concurrency performance optimize
Дата
Msg-id CANbhV-H=ynFXNUUYJXaYPSqetyBqqMmRn2hNtoRcd8JA=V1hag@mail.gmail.com
обсуждение исходный текст
Ответ на Re: suboverflowed subtransactions concurrency performance optimize  (Dilip Kumar <dilipbalaut@gmail.com>)
Ответы Re: suboverflowed subtransactions concurrency performance optimize  (Dilip Kumar <dilipbalaut@gmail.com>)
Список pgsql-hackers
On Fri, 3 Dec 2021 at 01:27, Dilip Kumar <dilipbalaut@gmail.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()

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dinesh Chemuduru
Дата:
Сообщение: Re: [PROPOSAL] new diagnostic items for the dynamic sql
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: suboverflowed subtransactions concurrency performance optimize