From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove useless arguments in ReadCheckpointRecord().
Date: Mon, 25 Jul 2022 01:59:55 +0000
Message-ID: <E1oFnNy-0017Yb-E4@gemulon.postgresql.org> (raw)
Remove useless arguments in ReadCheckpointRecord().
This commit removes two arguments "report" and "whichChkpt"
in ReadCheckpointRecord().
"report" is obviously useless because it's always true, i.e., there are
two callers of the function and they always specify true as "report".
Commit 1d919de5eb removed the only call with "report" = false.
"whichChkpt" indicated where the specified checkpoint location
came from, pg_control or backup_label. This information was used
to report different error messages depending on where the invalid
checkpoint record came from, when it was found.
But ReadCheckpointRecord() doesn't need to do that because
its callers already do that and users can still identify where
the invalid checkpoint record came from, by reading such log messages.
Also when "whichChkpt" was 0, the word "primary checkpoint" was used
in the log message and could confuse users because the concept of
primary and secondary checkpoints was already removed before.
These are why this commit removes "whichChkpt" argument.
Author: Fujii Masao
Reviewed-by: Bharath Rupireddy, Kyotaro Horiguchi
Discussion: https://postgr.es/m/fa2e12eb-81c3-0717-0272-755f8a81c8f2@oss.nttdata.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2387f52962e615eac937ed47de724e4d55ffffb7
Modified Files
--------------
src/backend/access/transam/xlogrecovery.c | 84 ++++++-------------------------
1 file changed, 15 insertions(+), 69 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: fujii@postgresql.org
Subject: Re: pgsql: Remove useless arguments in ReadCheckpointRecord().
In-Reply-To: <E1oFnNy-0017Yb-E4@gemulon.postgresql.org>
References: <E1oFnNy-0017Yb-E4@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox