Skip to content

Commit 113fa39

Browse files
committed
Fix incorrect format placeholders
1 parent cab5b9a commit 113fa39

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/backend/access/transam/xlog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10714,13 +10714,13 @@ xlog_block_info(StringInfo buf, XLogReaderState *record)
1071410714

1071510715
XLogRecGetBlockTag(record, block_id, &rnode, &forknum, &blk);
1071610716
if (forknum != MAIN_FORKNUM)
10717-
appendStringInfo(buf, "; blkref #%u: rel %u/%u/%u, fork %u, blk %u",
10717+
appendStringInfo(buf, "; blkref #%d: rel %u/%u/%u, fork %u, blk %u",
1071810718
block_id,
1071910719
rnode.spcNode, rnode.dbNode, rnode.relNode,
1072010720
forknum,
1072110721
blk);
1072210722
else
10723-
appendStringInfo(buf, "; blkref #%u: rel %u/%u/%u, blk %u",
10723+
appendStringInfo(buf, "; blkref #%d: rel %u/%u/%u, blk %u",
1072410724
block_id,
1072510725
rnode.spcNode, rnode.dbNode, rnode.relNode,
1072610726
blk);

src/backend/access/transam/xlogutils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -985,14 +985,14 @@ WALReadRaiseError(WALReadError *errinfo)
985985
errno = errinfo->wre_errno;
986986
ereport(ERROR,
987987
(errcode_for_file_access(),
988-
errmsg("could not read from log segment %s, offset %u: %m",
988+
errmsg("could not read from log segment %s, offset %d: %m",
989989
fname, errinfo->wre_off)));
990990
}
991991
else if (errinfo->wre_read == 0)
992992
{
993993
ereport(ERROR,
994994
(errcode(ERRCODE_DATA_CORRUPTED),
995-
errmsg("could not read from log segment %s, offset %u: read %d of %d",
995+
errmsg("could not read from log segment %s, offset %d: read %d of %d",
996996
fname, errinfo->wre_off, errinfo->wre_read,
997997
errinfo->wre_req)));
998998
}

src/bin/pg_waldump/pg_waldump.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,11 @@ WALDumpReadPage(XLogReaderState *state, XLogRecPtr targetPagePtr, int reqLen,
382382
if (errinfo.wre_errno != 0)
383383
{
384384
errno = errinfo.wre_errno;
385-
fatal_error("could not read from file %s, offset %u: %m",
385+
fatal_error("could not read from file %s, offset %d: %m",
386386
fname, errinfo.wre_off);
387387
}
388388
else
389-
fatal_error("could not read from file %s, offset %u: read %d of %d",
389+
fatal_error("could not read from file %s, offset %d: read %d of %d",
390390
fname, errinfo.wre_off, errinfo.wre_read,
391391
errinfo.wre_req);
392392
}
@@ -518,13 +518,13 @@ XLogDumpDisplayRecord(XLogDumpConfig *config, XLogReaderState *record)
518518

519519
XLogRecGetBlockTag(record, block_id, &rnode, &forknum, &blk);
520520
if (forknum != MAIN_FORKNUM)
521-
printf(", blkref #%u: rel %u/%u/%u fork %s blk %u",
521+
printf(", blkref #%d: rel %u/%u/%u fork %s blk %u",
522522
block_id,
523523
rnode.spcNode, rnode.dbNode, rnode.relNode,
524524
forkNames[forknum],
525525
blk);
526526
else
527-
printf(", blkref #%u: rel %u/%u/%u blk %u",
527+
printf(", blkref #%d: rel %u/%u/%u blk %u",
528528
block_id,
529529
rnode.spcNode, rnode.dbNode, rnode.relNode,
530530
blk);
@@ -548,7 +548,7 @@ XLogDumpDisplayRecord(XLogDumpConfig *config, XLogReaderState *record)
548548
continue;
549549

550550
XLogRecGetBlockTag(record, block_id, &rnode, &forknum, &blk);
551-
printf("\tblkref #%u: rel %u/%u/%u fork %s blk %u",
551+
printf("\tblkref #%d: rel %u/%u/%u fork %s blk %u",
552552
block_id,
553553
rnode.spcNode, rnode.dbNode, rnode.relNode,
554554
forkNames[forknum],
@@ -943,7 +943,7 @@ main(int argc, char **argv)
943943
private.startptr = (uint64) xlogid << 32 | xrecoff;
944944
break;
945945
case 't':
946-
if (sscanf(optarg, "%d", &private.timeline) != 1)
946+
if (sscanf(optarg, "%u", &private.timeline) != 1)
947947
{
948948
pg_log_error("could not parse timeline \"%s\"", optarg);
949949
goto bad_argument;

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