Re: Multiple Xids in PGPROC?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Multiple Xids in PGPROC?
Дата
Msg-id 8461.1083781096@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Multiple Xids in PGPROC?  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Ответы Re: Multiple Xids in PGPROC?
Re: Multiple Xids in PGPROC?
Список pgsql-hackers
Manfred Koizar <mkoi-pg@aon.at> writes:
> The straightforward pg_clog lookup is still in transam.c,
> but has been deactivated:
>  * Now this func in shmem.c and gives quality answer by scanning
>  * PGPROC structures of all running backend. - vadim 11/26/96

> What was the motivation for this change?  Consistency or speed?

Getting the right answer --- the other way can't tell the difference
between an open transaction and a crashed one.

>  .  We could include a small number of subtransaction xids in PGPROC.

Yeah, I was just thinking that myself.  If we only need to show open
subtrans xids, then the number you'd need would depend on nesting depth
not the total number of subxacts used.  So half-a-dozen or so would
probably suffice for 99% of situations.  You'd need a flag that could be
set to show "I'm so deeply nested I can't fit all my subxacts here",
but you'd only need to go to pg_subtrans when that happened.

On the other hand, I'm not sure how much that helps, considering you
probably have to resolve the subtrans XID up to its parent anyway to
check commit/abort status.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: ALTER TABLE TODO items
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: PostgreSQL pre-fork speedup