Re: Another way to reduce pg_subtrans lookup overhead

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Another way to reduce pg_subtrans lookup overhead
Дата
Msg-id 10854.1133450476@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Another way to reduce pg_subtrans lookup overhead  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane wrote:
>> I thought of a different approach to it, which is to make snapshot
>> checking take a hint from TransactionIdIsInProgress: use the subxid
>> caches from the PG_PROC array.

> Yeah, I had thought about using the XidCache while checking your other
> approach yesterday.  I was thinking however not in saving the Xids in
> the snapshot, but using the ones already in PGPROC.  Not sure if that is
> as useful, but looks like at least it would be able to reduce the
> probability of examining pg_subtrans in some cases without introducing
> extra cost.

How would that work?  The ones in PGPROC, by the time you are examining
the snapshot, might have little to do with the ones that were valid at
the time the snap was taken.  Another problem is that (AFAICS) you'd
have to lock the ProcArray to look at them, and the whole point of this
exercise is to avoid needing to lock shared data structures during
HeapTupleSatisfiesSnapshot.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] A couple of proposed pgbench changes
Следующее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: generalizing the planner knobs