1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00

Get rid of a global variable

bootstrap_data_checksum_version can just as easily be passed to where
it is used via function arguments.

Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://www.postgresql.org/message-id/flat/e0a62134-83da-4ba4-8cdb-ceb0111c95ce@eisentraut.org
This commit is contained in:
Peter Eisentraut
2024-07-23 09:53:54 +02:00
parent ffb0603929
commit 935e675f3c
3 changed files with 8 additions and 11 deletions

View File

@ -41,8 +41,6 @@
#include "utils/rel.h"
#include "utils/relmapper.h"
uint32 bootstrap_data_checksum_version = 0; /* No checksum */
static void CheckerModeMain(void);
static void bootstrap_signals(void);
@ -202,6 +200,7 @@ BootstrapModeMain(int argc, char *argv[], bool check_only)
char *progname = argv[0];
int flag;
char *userDoption = NULL;
uint32 bootstrap_data_checksum_version = 0; /* No checksum */
Assert(!IsUnderPostmaster);
@ -332,7 +331,7 @@ BootstrapModeMain(int argc, char *argv[], bool check_only)
BaseInit();
bootstrap_signals();
BootStrapXLOG();
BootStrapXLOG(bootstrap_data_checksum_version);
/*
* To ensure that src/common/link-canary.c is linked into the backend, we