pgsql: Simplify some maths in xlogreader.c

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Simplify some maths in xlogreader.c
Date: 2022-10-12 01:00:15
Message-ID: E1oiQ6Z-001yfG-9x@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Simplify some maths in xlogreader.c

An LSN was calculated from a segment number, a segment size and a
position offset, matching exactly the LSN given by the caller of
XLogReaderValidatePageHeader(). This change removes the extra LSN
calculation, relying only on the LSN given by the function caller
instead.

Author: Bharath Rupireddy
Reviewed-by: Richard Guo, Álvaro Herrera, Kyotaro Horiguchi
Discussion: https://postgr.es/m/CALj2ACXuh4Ms9j9sxMYdtHEe=5sFcyrs-GAHyADu_A_G71kZTg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a1176c67c42cf687675be762ebb6075e092d3d0a

Modified Files
--------------
src/backend/access/transam/xlogreader.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2022-10-12 04:44:47 pgsql: Fix shadow variable in postgres.c
Previous Message Michael Paquier 2022-10-11 23:53:03 Re: pgsql: Add support for COPY TO callback functions