pgsql: Remove useless arguments in ReadCheckpointRecord().

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема pgsql: Remove useless arguments in ReadCheckpointRecord().
Дата
Msg-id E1oFnNy-0017Yb-E4@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Doc: improve documentation about random().
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix ReadRecentBuffer for local buffers.