Re: Moving snapshot code around

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Moving snapshot code around
Дата
Msg-id 28927.1206550195@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Moving snapshot code around  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Moving snapshot code around
Список pgsql-patches
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Agreed, it makes a lot more sense considered in this light.  I renamed
> snapshot.{c,h} into snapmgmt.{c,h}, hopefully making the intent clearer.

I'd have gone with snapmgr.h/c for consistency with existing filenames
(bufmgr, lmgr, etc).

> One thing I'm unhappy about is that tqual.h needs to be included in
> heapam.h (which is included just about everywhere) just to get the
> definition of the HTSU_Result enum, which is a bit useless because it is
> only used in three switch statements that contain a "default" clause
> anyway.  I propose changing the result type of heap_update, heap_delete
> and heap_lock_tuple to a plain int.

I don't like that very much.  What about just moving the HTSU_Result
enum's declaration somewhere else?  Two possibilities are heapam.h
itself, or the new snapshot.h file (which'd then have to be included
by heapam.h, but it seems lightweight enough that that's not too
terrible).

            regards, tom lane

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Moving snapshot code around
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Moving snapshot code around