mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Revert 56-bit relfilenode change and follow-up commits.
There are still some alignment-related failures in the buildfarm, which might or might not be able to be fixed quickly, but I've also just realized that it increased the size of many WAL records by 4 bytes because a block reference contains a RelFileLocator. The effect of that hasn't been studied or discussed, so revert for now.
This commit is contained in:
@@ -26,7 +26,7 @@ out_gistxlogPageUpdate(StringInfo buf, gistxlogPageUpdate *xlrec)
|
||||
static void
|
||||
out_gistxlogPageReuse(StringInfo buf, gistxlogPageReuse *xlrec)
|
||||
{
|
||||
appendStringInfo(buf, "rel %u/%u/" UINT64_FORMAT "; blk %u; latestRemovedXid %u:%u",
|
||||
appendStringInfo(buf, "rel %u/%u/%u; blk %u; latestRemovedXid %u:%u",
|
||||
xlrec->locator.spcOid, xlrec->locator.dbOid,
|
||||
xlrec->locator.relNumber, xlrec->block,
|
||||
EpochFromFullTransactionId(xlrec->latestRemovedFullXid),
|
||||
|
||||
@@ -169,7 +169,7 @@ heap2_desc(StringInfo buf, XLogReaderState *record)
|
||||
{
|
||||
xl_heap_new_cid *xlrec = (xl_heap_new_cid *) rec;
|
||||
|
||||
appendStringInfo(buf, "rel %u/%u/" UINT64_FORMAT "; tid %u/%u",
|
||||
appendStringInfo(buf, "rel %u/%u/%u; tid %u/%u",
|
||||
xlrec->target_locator.spcOid,
|
||||
xlrec->target_locator.dbOid,
|
||||
xlrec->target_locator.relNumber,
|
||||
|
||||
@@ -100,7 +100,7 @@ btree_desc(StringInfo buf, XLogReaderState *record)
|
||||
{
|
||||
xl_btree_reuse_page *xlrec = (xl_btree_reuse_page *) rec;
|
||||
|
||||
appendStringInfo(buf, "rel %u/%u/" UINT64_FORMAT "; latestRemovedXid %u:%u",
|
||||
appendStringInfo(buf, "rel %u/%u/%u; latestRemovedXid %u:%u",
|
||||
xlrec->locator.spcOid, xlrec->locator.dbOid,
|
||||
xlrec->locator.relNumber,
|
||||
EpochFromFullTransactionId(xlrec->latestRemovedFullXid),
|
||||
|
||||
@@ -25,7 +25,7 @@ seq_desc(StringInfo buf, XLogReaderState *record)
|
||||
xl_seq_rec *xlrec = (xl_seq_rec *) rec;
|
||||
|
||||
if (info == XLOG_SEQ_LOG)
|
||||
appendStringInfo(buf, "rel %u/%u/" UINT64_FORMAT,
|
||||
appendStringInfo(buf, "rel %u/%u/%u",
|
||||
xlrec->locator.spcOid, xlrec->locator.dbOid,
|
||||
xlrec->locator.relNumber);
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ xlog_desc(StringInfo buf, XLogReaderState *record)
|
||||
CheckPoint *checkpoint = (CheckPoint *) rec;
|
||||
|
||||
appendStringInfo(buf, "redo %X/%X; "
|
||||
"tli %u; prev tli %u; fpw %s; xid %u:%u; relfilenumber " UINT64_FORMAT "; oid %u; "
|
||||
"multi %u; offset %u; oldest xid %u in DB %u; oldest multi %u in DB %u; "
|
||||
"tli %u; prev tli %u; fpw %s; xid %u:%u; oid %u; multi %u; offset %u; "
|
||||
"oldest xid %u in DB %u; oldest multi %u in DB %u; "
|
||||
"oldest/newest commit timestamp xid: %u/%u; "
|
||||
"oldest running xid %u; %s",
|
||||
LSN_FORMAT_ARGS(checkpoint->redo),
|
||||
@@ -55,7 +55,6 @@ xlog_desc(StringInfo buf, XLogReaderState *record)
|
||||
checkpoint->fullPageWrites ? "true" : "false",
|
||||
EpochFromFullTransactionId(checkpoint->nextXid),
|
||||
XidFromFullTransactionId(checkpoint->nextXid),
|
||||
checkpoint->nextRelFileNumber,
|
||||
checkpoint->nextOid,
|
||||
checkpoint->nextMulti,
|
||||
checkpoint->nextMultiOffset,
|
||||
@@ -75,13 +74,6 @@ xlog_desc(StringInfo buf, XLogReaderState *record)
|
||||
memcpy(&nextOid, rec, sizeof(Oid));
|
||||
appendStringInfo(buf, "%u", nextOid);
|
||||
}
|
||||
else if (info == XLOG_NEXT_RELFILENUMBER)
|
||||
{
|
||||
RelFileNumber nextRelFileNumber;
|
||||
|
||||
memcpy(&nextRelFileNumber, rec, sizeof(RelFileNumber));
|
||||
appendStringInfo(buf, UINT64_FORMAT, nextRelFileNumber);
|
||||
}
|
||||
else if (info == XLOG_RESTORE_POINT)
|
||||
{
|
||||
xl_restore_point *xlrec = (xl_restore_point *) rec;
|
||||
@@ -177,9 +169,6 @@ xlog_identify(uint8 info)
|
||||
case XLOG_NEXTOID:
|
||||
id = "NEXTOID";
|
||||
break;
|
||||
case XLOG_NEXT_RELFILENUMBER:
|
||||
id = "NEXT_RELFILENUMBER";
|
||||
break;
|
||||
case XLOG_SWITCH:
|
||||
id = "SWITCH";
|
||||
break;
|
||||
@@ -248,7 +237,7 @@ XLogRecGetBlockRefInfo(XLogReaderState *record, bool pretty,
|
||||
appendStringInfoChar(buf, ' ');
|
||||
|
||||
appendStringInfo(buf,
|
||||
"blkref #%d: rel %u/%u/" UINT64_FORMAT " fork %s blk %u",
|
||||
"blkref #%d: rel %u/%u/%u fork %s blk %u",
|
||||
block_id,
|
||||
rlocator.spcOid, rlocator.dbOid, rlocator.relNumber,
|
||||
forkNames[forknum],
|
||||
@@ -308,7 +297,7 @@ XLogRecGetBlockRefInfo(XLogReaderState *record, bool pretty,
|
||||
if (forknum != MAIN_FORKNUM)
|
||||
{
|
||||
appendStringInfo(buf,
|
||||
", blkref #%d: rel %u/%u/" UINT64_FORMAT " fork %s blk %u",
|
||||
", blkref #%d: rel %u/%u/%u fork %s blk %u",
|
||||
block_id,
|
||||
rlocator.spcOid, rlocator.dbOid, rlocator.relNumber,
|
||||
forkNames[forknum],
|
||||
@@ -317,7 +306,7 @@ XLogRecGetBlockRefInfo(XLogReaderState *record, bool pretty,
|
||||
else
|
||||
{
|
||||
appendStringInfo(buf,
|
||||
", blkref #%d: rel %u/%u/" UINT64_FORMAT " blk %u",
|
||||
", blkref #%d: rel %u/%u/%u blk %u",
|
||||
block_id,
|
||||
rlocator.spcOid, rlocator.dbOid, rlocator.relNumber,
|
||||
blk);
|
||||
|
||||
Reference in New Issue
Block a user