Re: WAL logging of heap_mark4update

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WAL logging of heap_mark4update
Дата
Msg-id 12138.1105825736@sss.pgh.pa.us
обсуждение исходный текст
Ответ на WAL logging of heap_mark4update  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Ответы Re: WAL logging of heap_mark4update  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> Hackers,
> In access/heap/heapam.c, in heap_mark4update(), there's a comment that
> states

>     /*
>      * XLOG stuff: no logging is required as long as we have no
>      * savepoints. For savepoints private log could be used...
>      */

> Is this still true in light of 8.0's savepoints?

It isn't.  Since mark4update is simply establishing a lock, which isn't
going to be held across a system crash anyway, I see no need to WAL-log
it.  (But hmmm ... to support 2PC we'd probably need to do so ...)

> I think the comment was made assuming that savepoints would be
> implemented using REDO,

I think the same.

> In any case I'm contemplating changing exclusive row locks to use
> LockAcquire, and supporting shared row locks using the same mechanism.
> All this per previous discussion on -hackers.  We could get rid of
> heap_mark4update if that's done, right?

Right.  The 2PC connection is another reason to do it that way --- 2PC
would require some way to save locks anyhow, and it'd be nice if there
were only one mechanism to deal with not two.
        regards, tom lane


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

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: FATAL: catalog is missing 1 attribute(s) for relid
Следующее
От: Bruce Momjian
Дата:
Сообщение: Encodings and docs