Re: suboverflowed subtransactions concurrency performance optimize

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: suboverflowed subtransactions concurrency performance optimize
Дата
Msg-id CAA4eK1L7ou9=EJYBDsrzqeCw2dO_RLUMjsMFxJAESc5tyb_S1A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: suboverflowed subtransactions concurrency performance optimize  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: suboverflowed subtransactions concurrency performance optimize  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Thu, May 26, 2022 at 12:53 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Tue, May 24, 2022 at 04:52:50PM -0700, Andres Freund wrote:
>
> > 2) xid wraparound. There's nothing forcing SubTransGetTopmostTransaction() to
> >    be called regularly, so even if a backend isn't idle, the cache could just
> >    get more and more outdated until hitting wraparound
>
> Hence, you mean that the non-regularity of the call makes it more
> exposed to an inconsistent result after a wraparound?
>

Won't in theory the similar cache in transam.c is also prone to
similar behavior?

Anyway, how about if we clear this cache for subtrans whenever
TransactionXmin is advanced and cachedFetchSubXid precedes it? The
comments atop SubTransGetTopmostTransaction seem to state that we
don't care about the exact topmost parent when the intermediate one
precedes TransactionXmin. I think it should preserve the optimization
because anyway for such cases there is a fast path in
SubTransGetTopmostTransaction.

-- 
With Regards,
Amit Kapila.



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

Предыдущее
От: "houzj.fnst@fujitsu.com"
Дата:
Сообщение: RE: Support logical replication of DDLs
Следующее
От: Etsuro Fujita
Дата:
Сообщение: Re: doc: CREATE FOREIGN TABLE .. PARTITION OF .. DEFAULT