Skip to content

Fix incorrect usage of gp_versionstr in pg_upgrade version check #1063

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/backend/access/rmgrdesc/nbtdesc.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ out_insert(StringInfo buf, uint8 info, XLogReaderState *record)
char *ptr;
xl_btree_insert *xlrec = (xl_btree_insert *) rec;
xl_btree_metadata *md;
BlockNumber blkno;
BlockNumber blkno = InvalidBlockNumber;
bool fullpage;
Size datalen;
Size datalen = 0;

fullpage = XLogRecHasBlockImage(record, 0);
XLogRecGetBlockTag(record, 0, NULL, NULL, &blkno);
Expand Down
2 changes: 1 addition & 1 deletion src/bin/pg_upgrade/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ check_exec(const char *dir, const char *program, bool check_version)
pg_strip_crlf(line);

snprintf(versionstr, sizeof(versionstr), "%s (PostgreSQL) " PG_VERSION, program);
snprintf(versionstr, sizeof(versionstr), "%s (Apache Cloudberry) " PG_VERSION, program);
snprintf(gp_versionstr, sizeof(versionstr), "%s (Apache Cloudberry) " PG_VERSION, program);

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