Re: Remove an unnecessary LSN calculation while validating WAL page header

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Remove an unnecessary LSN calculation while validating WAL page header
Date: 2022-10-11 16:24:26
Message-ID: 20221011162426.lu3g3j3gzyu3bluf@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2022-Oct-11, Richard Guo wrote:

> As I can see in 7fcbf6a4 ValidXLogPageHeader() is refactored as

True, but look at dfda6ebaec67 -- that changed the use of recaddr from
being built from parts (which were globals back then) into something
that was computed locally.

Knowing how difficult that code was, and how heroic was to change it to
a more maintainable form, I place no blame on failing to notice that
some small thing could have been written more easily.

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
Y una voz del caos me habló y me dijo
"Sonríe y sé feliz, podría ser peor".
Y sonreí. Y fui feliz.
Y fue peor.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhihong Yu 2022-10-11 16:58:01 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Previous Message Dmitry Koval 2022-10-11 16:21:54 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands