Re: Why is XLOG_FPI_FOR_HINT always need backups?

From: Japin Li <japinli(at)hotmail(dot)com>
To: zwj <757634191(at)qq(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Why is XLOG_FPI_FOR_HINT always need backups?
Date: 2021-07-06 11:04:25
Message-ID: ME3P282MB1667D1C04EE77787CBBC405CB61B9@ME3P282MB1667.AUSP282.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Tue, 06 Jul 2021 at 17:58, zwj <757634191(at)qq(dot)com> wrote:
> Hi all,
>
> When I read the source code file src/backend/access/transam/xloginsert.c, I get something confused me.
> In the function XLogSaveBufferForHint, the flags are always REGBUF_FORCE_IMAGE which means it is always need backups.
> Is it right? Why do not check the full_page_writes?

The documentation [1] says:

------------------------------------------------------------------------------
wal_log_hints (boolean)
When this parameter is on, the PostgreSQL server writes the entire content of
each disk page to WAL during the first modification of that page after a
checkpoint, even for non-critical modifications of so-called hint bits.
------------------------------------------------------------------------------

Does that mean whether the full_page_writes enable or not, if the wal_log_hints
enabled, we always write the entire content of each disk page to WAL? If I'm
right, should we mention this in wal_log_hints?

[1] https://www.postgresql.org/docs/current/runtime-config-wal.html

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-07-06 11:10:15 Re: ECPG doesn't compile CREATE AS EXECUTE properly.
Previous Message Michael Paquier 2021-07-06 11:03:20 Re: Can a child process detect postmaster death when in pg_usleep?