Re: Should buffer of initialization fork have a BM_PERMANENT flag

From: Artur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Wang Hao <whberet(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Should buffer of initialization fork have a BM_PERMANENT flag
Date: 2017-03-10 15:03:28
Message-ID: 9d16ad58-3546-1269-0073-7038efe83dc5@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10.03.2017 04:00, Michael Paquier wrote:
> On Thu, Mar 9, 2017 at 10:25 PM, Artur Zakirov <a(dot)zakirov(at)postgrespro(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-03-10 15:05:04 Re: Re: proposal - psql: possibility to specify sort for describe commands, when size is printed
Previous Message Peter Eisentraut 2017-03-10 15:02:34 Re: some dblink refactoring