Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 59a884e

Browse files
committed
Change delimiter used for display of NextXID
NextXID has been rendered in the form of a pg_lsn even though it really is not. This can cause confusion, so change the format from %u/%u to %u:%u, per discussion on hackers. Complaint by me, patch by me and Bruce, reviewed by Michael Paquier and Alvaro. Applied to HEAD only. Author: Joe Conway, Bruce Momjian Reviewed-by: Michael Paquier, Alvaro Herrera Backpatch-through: master
1 parent e84e06d commit 59a884e

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

src/backend/access/rmgrdesc/xlogdesc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ xlog_desc(StringInfo buf, XLogReaderState *record)
4343
CheckPoint *checkpoint = (CheckPoint *) rec;
4444

4545
appendStringInfo(buf, "redo %X/%X; "
46-
"tli %u; prev tli %u; fpw %s; xid %u/%u; oid %u; multi %u; offset %u; "
46+
"tli %u; prev tli %u; fpw %s; xid %u:%u; oid %u; multi %u; offset %u; "
4747
"oldest xid %u in DB %u; oldest multi %u in DB %u; "
4848
"oldest/newest commit timestamp xid: %u/%u; "
4949
"oldest running xid %u; %s",

src/backend/access/transam/xlog.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6283,7 +6283,7 @@ StartupXLOG(void)
62836283
(uint32) (checkPoint.redo >> 32), (uint32) checkPoint.redo,
62846284
wasShutdown ? "TRUE" : "FALSE")));
62856285
ereport(DEBUG1,
6286-
(errmsg_internal("next transaction ID: %u/%u; next OID: %u",
6286+
(errmsg_internal("next transaction ID: %u:%u; next OID: %u",
62876287
checkPoint.nextXidEpoch, checkPoint.nextXid,
62886288
checkPoint.nextOid)));
62896289
ereport(DEBUG1,

src/bin/pg_controldata/pg_controldata.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ main(int argc, char *argv[])
252252
ControlFile.checkPointCopy.PrevTimeLineID);
253253
printf(_("Latest checkpoint's full_page_writes: %s\n"),
254254
ControlFile.checkPointCopy.fullPageWrites ? _("on") : _("off"));
255-
printf(_("Latest checkpoint's NextXID: %u/%u\n"),
255+
printf(_("Latest checkpoint's NextXID: %u:%u\n"),
256256
ControlFile.checkPointCopy.nextXidEpoch,
257257
ControlFile.checkPointCopy.nextXid);
258258
printf(_("Latest checkpoint's NextOID: %u\n"),

src/bin/pg_resetxlog/pg_resetxlog.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ PrintControlValues(bool guessed)
646646
ControlFile.checkPointCopy.ThisTimeLineID);
647647
printf(_("Latest checkpoint's full_page_writes: %s\n"),
648648
ControlFile.checkPointCopy.fullPageWrites ? _("on") : _("off"));
649-
printf(_("Latest checkpoint's NextXID: %u/%u\n"),
649+
printf(_("Latest checkpoint's NextXID: %u:%u\n"),
650650
ControlFile.checkPointCopy.nextXidEpoch,
651651
ControlFile.checkPointCopy.nextXid);
652652
printf(_("Latest checkpoint's NextOID: %u\n"),

src/bin/pg_upgrade/controldata.c

+9-2
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,18 @@ get_control_data(ClusterInfo *cluster, bool live_check)
197197
p++; /* remove ':' char */
198198
cluster->controldata.chkpnt_nxtepoch = str2uint(p);
199199

200-
p = strchr(p, '/');
200+
if (strchr(p, '/') != NULL)
201+
p = strchr(p, '/');
202+
/* delimiter changed from '/' to ':' in 9.6 */
203+
else if (GET_MAJOR_VERSION(cluster->major_version) >= 906)
204+
p = strchr(p, ':');
205+
else
206+
p = NULL;
207+
201208
if (p == NULL || strlen(p) <= 1)
202209
pg_fatal("%d: controldata retrieval problem\n", __LINE__);
203210

204-
p++; /* remove '/' char */
211+
p++; /* remove '/' or ':' char */
205212
cluster->controldata.chkpnt_nxtxid = str2uint(p);
206213
got_xid = true;
207214
}

0 commit comments

Comments
 (0)