SerialAdd-debugging.patch
text/x-patch
Filename: SerialAdd-debugging.patch
Type: text/x-patch
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/backend/storage/lmgr/predicate.c | 6 | 0 |
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 1af41213b4..4f7c15978a 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -871,12 +871,16 @@ SerialAdd(TransactionId xid, SerCommitSeqNo minConflictCommitSeqNo)
{
firstZeroPage = SerialPage(tailXid);
isNewPage = true;
+elog(LOG, "!!!SerialAdd| xid: %d, serialControl->headPage: %d, tailXid: %d, SERIAL_ENTRIESPERPAGE: %ld, firstZeroPage: %d, targetPage: %d, isNewPage: %d",
+xid, serialControl->headPage, tailXid, SERIAL_ENTRIESPERPAGE, firstZeroPage, targetPage, isNewPage);
}
else
{
firstZeroPage = SerialNextPage(serialControl->headPage);
isNewPage = SerialPagePrecedesLogically(serialControl->headPage,
targetPage);
+elog(LOG, "!!!SerialAdd| xid: %d, serialControl->headPage: %d, firstZeroPage: %d, targetPage: %d, isNewPage: %d",
+xid, serialControl->headPage, firstZeroPage, targetPage, isNewPage);
}
if (!TransactionIdIsValid(serialControl->headXid)
@@ -887,6 +891,7 @@ SerialAdd(TransactionId xid, SerCommitSeqNo minConflictCommitSeqNo)
if (isNewPage)
{
+elog(LOG, "!!!SerialAdd: isNewPage, firstZeroPage: %d, targetPage: %d", firstZeroPage, targetPage);
/* Initialize intervening pages. */
while (firstZeroPage != targetPage)
{
@@ -894,6 +899,7 @@ SerialAdd(TransactionId xid, SerCommitSeqNo minConflictCommitSeqNo)
firstZeroPage = SerialNextPage(firstZeroPage);
}
slotno = SimpleLruZeroPage(SerialSlruCtl, targetPage);
+elog(LOG, "!!!SerialAdd: after while, slotno: %d", slotno);
}
else
slotno = SimpleLruReadPage(SerialSlruCtl, targetPage, true, xid);