Skip to content

Commit 082eaae

Browse files
committed
Fix incorrect usage of gp_versionstr in pg_upgrade version check
Previously, the Cloudberry-specific version string was incorrectly written into `versionstr` instead of `gp_versionstr`, breaking the fallback comparison logic in `check_exec()`. This caused version checks to fail when the program output matched the expected Apache Cloudberry format.
1 parent 8da79b3 commit 082eaae

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/backend/access/rmgrdesc/nbtdesc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ out_insert(StringInfo buf, uint8 info, XLogReaderState *record)
2626
char *ptr;
2727
xl_btree_insert *xlrec = (xl_btree_insert *) rec;
2828
xl_btree_metadata *md;
29-
BlockNumber blkno;
29+
BlockNumber blkno = InvalidBlockNumber;
3030
bool fullpage;
3131
Size datalen;
3232

src/bin/pg_upgrade/exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ check_exec(const char *dir, const char *program, bool check_version)
457457
pg_strip_crlf(line);
458458

459459
snprintf(versionstr, sizeof(versionstr), "%s (PostgreSQL) " PG_VERSION, program);
460-
snprintf(versionstr, sizeof(versionstr), "%s (Apache Cloudberry) " PG_VERSION, program);
460+
snprintf(gp_versionstr, sizeof(versionstr), "%s (Apache Cloudberry) " PG_VERSION, program);
461461

462462
if (strcmp(line, versionstr) != 0 && strcmp(line, gp_versionstr) != 0)
463463
pg_fatal("check for \"%s\" failed: incorrect version: found \"%s\", expected \"%s\" or \"%s\"\n",

0 commit comments

Comments
 (0)