Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 01effb1

Browse files
committed
Fix unsigned output format in SLRU error reporting
Avoid printing signed values as unsigned. (No impact in practice expected.) Author: Pavel Borisov <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/CALT9ZEHN7hWJo6MgJKqoDMGj%3DGOzQU50wTvOYZXDj7x%3DsUK-kw%40mail.gmail.com
1 parent b604a1c commit 01effb1

File tree

1 file changed

+5
-5
lines changed
  • src/backend/access/transam

1 file changed

+5
-5
lines changed

src/backend/access/transam/slru.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -949,32 +949,32 @@ SlruReportIOError(SlruCtl ctl, int pageno, TransactionId xid)
949949
ereport(ERROR,
950950
(errcode_for_file_access(),
951951
errmsg("could not access status of transaction %u", xid),
952-
errdetail("Could not seek in file \"%s\" to offset %u: %m.",
952+
errdetail("Could not seek in file \"%s\" to offset %d: %m.",
953953
path, offset)));
954954
break;
955955
case SLRU_READ_FAILED:
956956
if (errno)
957957
ereport(ERROR,
958958
(errcode_for_file_access(),
959959
errmsg("could not access status of transaction %u", xid),
960-
errdetail("Could not read from file \"%s\" at offset %u: %m.",
960+
errdetail("Could not read from file \"%s\" at offset %d: %m.",
961961
path, offset)));
962962
else
963963
ereport(ERROR,
964964
(errmsg("could not access status of transaction %u", xid),
965-
errdetail("Could not read from file \"%s\" at offset %u: read too few bytes.", path, offset)));
965+
errdetail("Could not read from file \"%s\" at offset %d: read too few bytes.", path, offset)));
966966
break;
967967
case SLRU_WRITE_FAILED:
968968
if (errno)
969969
ereport(ERROR,
970970
(errcode_for_file_access(),
971971
errmsg("could not access status of transaction %u", xid),
972-
errdetail("Could not write to file \"%s\" at offset %u: %m.",
972+
errdetail("Could not write to file \"%s\" at offset %d: %m.",
973973
path, offset)));
974974
else
975975
ereport(ERROR,
976976
(errmsg("could not access status of transaction %u", xid),
977-
errdetail("Could not write to file \"%s\" at offset %u: wrote too few bytes.",
977+
errdetail("Could not write to file \"%s\" at offset %d: wrote too few bytes.",
978978
path, offset)));
979979
break;
980980
case SLRU_FSYNC_FAILED:

0 commit comments

Comments
 (0)