common和contrib路径下存在格式化使用错误场景
This commit is contained in:
@ -103,7 +103,7 @@ static void parse_clog_file(const int segnum)
|
||||
for (bit_index = 0; bit_index < 4; bit_index++) {
|
||||
bshift = TransactionIdToBIndex(xid) * CLOG_BITS_PER_XACT;
|
||||
status = (*byteptr >> bshift) & CLOG_XACT_BITMASK;
|
||||
fprintf(stdout, "xid %u, status: %s\n", xid, xid_status_name[status]);
|
||||
fprintf(stdout, "xid %lu, status: %s\n", xid, xid_status_name[status]);
|
||||
xid++;
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ static void parse_single_xid(const TransactionId xid)
|
||||
|
||||
byteptr = buffer + byteno;
|
||||
status = (*byteptr >> bshift) & CLOG_XACT_BITMASK;
|
||||
fprintf(stdout, "xid %u, status: %s\n", xid, xid_status_name[status]);
|
||||
fprintf(stdout, "xid %lu, status: %s\n", xid, xid_status_name[status]);
|
||||
|
||||
if (close(fd)) {
|
||||
fprintf(stderr, "file close error !\n");
|
||||
|
@ -199,7 +199,7 @@ static void show_slot(char* buffer, size_t size)
|
||||
char lsn[64] = {0};
|
||||
|
||||
if (size != sizeof(ReplicationSlotOnDisk)) {
|
||||
fprintf(stderr, _("unexpected slot file size %d, expected %d\n"), (int)size, sizeof(ReplicationSlotOnDisk));
|
||||
fprintf(stderr, _("unexpected slot file size %d, expected %lu\n"), (int)size, sizeof(ReplicationSlotOnDisk));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -237,7 +237,7 @@ static void show_slot(char* buffer, size_t size)
|
||||
snprintf(lsn, 63, "%X/%X", (uint32)(slot.slotdata.restart_lsn >> 32), (uint32)slot.slotdata.restart_lsn);
|
||||
|
||||
fprintf(stderr,
|
||||
_("%-24s| %-12s| %-8u| %-8u| %-12s| %-12s\n"),
|
||||
_("%-24s| %-12s| %-8u| %-8lu| %-12s| %-12s\n"),
|
||||
NameStr(slot.slotdata.name),
|
||||
(slot.slotdata.database == InvalidOid) ? "physical" : "logical",
|
||||
slot.slotdata.database,
|
||||
|
Reference in New Issue
Block a user