diff --git a/contrib/pg_check_clog/pg_check_clog.cpp b/contrib/pg_check_clog/pg_check_clog.cpp index 26ab71087..a320dc998 100644 --- a/contrib/pg_check_clog/pg_check_clog.cpp +++ b/contrib/pg_check_clog/pg_check_clog.cpp @@ -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"); diff --git a/contrib/pg_check_replslot/pg_check_replslot.cpp b/contrib/pg_check_replslot/pg_check_replslot.cpp index 472d06c91..15c16bee0 100644 --- a/contrib/pg_check_replslot/pg_check_replslot.cpp +++ b/contrib/pg_check_replslot/pg_check_replslot.cpp @@ -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,