Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite8f87a9

Browse files
author
Alexander Korotkov
committed
Fix bug in 64bit xids.
Change of page epoch was unlogged when no items on the page.
1 parent81efcfa commite8f87a9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎src/backend/access/heap/heapam.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2869,10 +2869,15 @@ heap_page_prepare_for_xid(Relation relation, Buffer buffer,
28692869
/* No items on the page? */
28702870
if (!found)
28712871
{
2872+
int64delta;
2873+
28722874
if (!multi)
2873-
pageHdr->pd_xid_epoch=xid-FirstNormalTransactionId;
2875+
delta=(xid-FirstNormalTransactionId)-pageHdr->pd_xid_epoch;
28742876
else
2875-
pageHdr->pd_multi_epoch=xid-FirstNormalTransactionId;
2877+
delta= (xid-FirstNormalTransactionId)-pageHdr->pd_multi_epoch;
2878+
2879+
heap_page_shift_epoch(RelationNeedsWAL(relation) ?buffer :InvalidBuffer,
2880+
page,multi,delta);
28762881
MarkBufferDirty(buffer);
28772882
return false;
28782883
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp