Re: log_newpage header comment

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: log_newpage header comment
Date: 2012-06-11 15:05:23
Message-ID: CA+TgmobLLnnzjjd+hcVxZ4nPvmaawZ1NhUgdH7AXBvwb61B08w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jun 10, 2012 at 11:41 PM, Amit Kapila <amit(dot)kapila(at)huawei(dot)com> wrote:
>>>Uh... no.  The whole point of doing things in shared buffers is that
>>>you don't have to write and fsync the buffers immediately.  Instead,
>>>buffer evicting handles that stuff for you.
>
> So you mean to say that there exists operations where Xlog is not required
> even though it marks the buffer as dirty for later eviction.

Correct.

>>>I don't see why it's any different from log_newpage() in that regard.
>>>That data is initialized before being written, as well, but someone
>>>contemplated the possible need to write a page of all zeros.
>
> The comment above the code indicates that "the page is uninitialized".
> Does the code consider page with all zero's as uninitialized or the comment
> is not
> appropriate.

Yes, all zeroes = uninitialized.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-06-11 15:09:11 9.2 final
Previous Message Magnus Hagander 2012-06-11 13:19:12 Re: pg_basebackup blocking all queries with horrible performance