Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: [HACKERS] [PATCH] pageinspect function to decode infomasks
Дата
Msg-id 45433d99-f080-bb95-8aba-fc6b0c523bd0@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] [PATCH] pageinspect function to decode infomasks  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [HACKERS] [PATCH] pageinspect function to decode infomasks  ("Moon Insung" <Moon_Insung_i3@lab.ntt.co.jp>)
Re: [HACKERS] [PATCH] pageinspect function to decode infomasks  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers

On 08/15/2017 09:55 PM, Robert Haas wrote:
> On Tue, Aug 15, 2017 at 3:42 PM, Tomas Vondra
> <tomas.vondra@2ndquadrant.com> wrote:
>> What I think we should not do is interpret the bitmasks (omitting some of
>> the information) assuming all the bits were set correctly.
> 
> I'm still confused. HEAP_XMIN_COMMITTED|HEAP_XMIN_ABORTED == 
> HEAP_XMIN_FROZEN. Nobody is proposing to omit anything; to the 
> contrary, what's being proposed is not to display the same thing
> twice (and in a misleading fashion, to boot).
> 

I understand your point. Assume you're looking at this bit of code:
    if (HeapTupleHeaderXminCommitted(enumval_tup->t_data))        return;

which is essentially
    if (enumval_tup->t_data & HEAP_XMIN_COMMITTED)        return;

If the function only gives you HEAP_XMIN_FROZEN, how likely is it you 
miss this actually evaluates as true?

You might say that people investigating issues in this area of code 
should be aware of how HEAP_XMIN_FROZEN is defined, and perhaps you're 
right ...

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] increasing the default WAL segment size
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Proposal : For Auto-Prewarm.