Re: [pgsql-patches] Phantom Command IDs, updated patch

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [pgsql-patches] Phantom Command IDs, updated patch
Дата
Msg-id 21374.1170978338@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Phantom Command IDs, updated patch  (Heikki Linnakangas <heikki@enterprisedb.com>)
Список pgsql-patches
Heikki Linnakangas <heikki@enterprisedb.com> writes:
> I found one more subtle safety issue. The array and hash table for
> phantom command ids is dynamically grown when HeapTupleHeaderSetCmax is
> called. Unfortunately, since HeapTupleHeaderSetCmax is used inside a
> critical sections, running out of memory while trying to grow them would
> cause a PANIC. That's why I moved the SetXmax/SetCmax calls outside
> critical sections in heapam.c. I believe that's safe; if a backend
> aborts after setting the xmax/cmax, no-one is going to care about the
> xid of an aborted transaction in there.

I don't like that one bit; I think a saner solution is to refactor the
API of combocid.c so that we can obtain the required CID before
modifying the page.  It'll mean it's not a drop-in replacement for
HeapTupleSetCmax, but all callers of that are going to need a close look
anyway.

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] plpgsql, return can contains any expression
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Have psql show current sequnce values - (Resubmission)