Skip to content

Commit b60a91b

Browse files
ligurioSergey Bronnikov
authored andcommitted
Use 2^32 XID offset when XID_IS_64BIT is defined
1 parent 0e04906 commit b60a91b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/test/regress/pg_regress.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include "getopt_long.h"
3535
#include "libpq/pqcomm.h" /* needed for UNIXSOCK_PATH() */
3636
#include "pg_config_paths.h"
37+
#include "pg_config.h"
3738

3839
/* for resultmap we need a list of pairs of strings */
3940
typedef struct _resultmap
@@ -73,6 +74,7 @@ char *inputdir = ".";
7374
char *outputdir = ".";
7475
char *bindir = PGBINDIR;
7576
char *launcher = NULL;
77+
char *xid_options = NULL;
7678
static _stringlist *loadlanguage = NULL;
7779
static _stringlist *loadextension = NULL;
7880
static int max_connections = 0;
@@ -2215,13 +2217,17 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
22152217

22162218
/* initdb */
22172219
header(_("initializing database system"));
2220+
#ifdef XID_IS_64BIT
2221+
xid_options = " -x 4294967296 -m 4294967296";
2222+
#endif
22182223
snprintf(buf, sizeof(buf),
2219-
"\"%s%sinitdb\" -D \"%s/data\" --noclean --nosync%s%s > \"%s/log/initdb.log\" 2>&1",
2224+
"\"%s%sinitdb\" -D \"%s/data\" --noclean --nosync%s%s%s > \"%s/log/initdb.log\" 2>&1",
22202225
bindir ? bindir : "",
22212226
bindir ? "/" : "",
22222227
temp_instance,
22232228
debug ? " --debug" : "",
22242229
nolocale ? " --no-locale" : "",
2230+
xid_options,
22252231
outputdir);
22262232
if (system(buf))
22272233
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy