Re: [HACKERS] Should buffer of initialization fork have aBM_PERMANENT flag - Mailing list pgsql-hackers

From Artur Zakirov
Subject Re: [HACKERS] Should buffer of initialization fork have aBM_PERMANENT flag
Date
Msg-id 9d16ad58-3546-1269-0073-7038efe83dc5@postgrespro.ru
Whole thread Raw
In response to Re: [HACKERS] Should buffer of initialization fork have aBM_PERMANENT flag  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [HACKERS] Should buffer of initialization fork have aBM_PERMANENT flag  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On 10.03.2017 04:00, Michael Paquier wrote:
> On Thu, Mar 9, 2017 at 10:25 PM, Artur Zakirov <a.zakirov@postgrespro.ru> wrote:
>> I think this is good fixes. I've checked them. And in my opinion they are
>> correct.
>>
>> The code also is good.
>
> Having something with conflicts is not nice, so attached is a rebased version.

Thank you!

I've rerun regression and TAP tests. They all passed.

Also maybe it will be good to fix comments.

In buf_internals.h:
> #define BM_PERMANENT            (1U << 31)        /* permanent relation (not
>                                                    * unlogged) */

And in FlushBuffer():
>     /*
>      * Force XLOG flush up to buffer's LSN.  This implements the basic WAL
>      * rule that log updates must hit disk before any of the data-file changes
>      * they describe do.
>      *
>      * However, this rule does not apply to unlogged relations, which will be
>      * lost after a crash anyway.  Most unlogged relation pages do not bear

Because BM_PERMANENT is used for init forks of unlogged indexes now.

-- 
Artur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] some dblink refactoring
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Re: proposal - psql: possibility to specify sort fordescribe commands, when size is printed