Re: Is this a problem in GenericXLogFinish()?

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: 'Amit Kapila' <amit(dot)kapila16(at)gmail(dot)com>, Alexander Lakhin <exclusion(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is this a problem in GenericXLogFinish()?
Date: 2024-02-05 08:03:15
Message-ID: ZcCWQ9uOkZkX4gGx@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 05, 2024 at 07:57:09AM +0000, Hayato Kuroda (Fujitsu) wrote:
> You are right. Based on the previous discussions, PageSetLSN() must be called
> after the MakeBufferDirty(). REGBUF_NO_CHANGE has been introduced for skipping
> these requirements. Definitevely, no_change buffers must not be PageSetLSN()'d.
> Other pages, e.g., metabuf, has already been followed the rule.

At quick glance, this v2 seems kind of right to me: you are setting
the page LSN only when the page is registered in the record and
actually dirtied.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo NAGATA 2024-02-05 08:22:56 Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row
Previous Message Michael Paquier 2024-02-05 08:00:28 Re: meson: catalog/syscache_ids.h isn't installed