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

Commit46acbeb

Browse files
committed
Make HEAP_LOCK/HEAP2_LOCK_UPDATED replay reset HEAP_XMAX_INVALID.
0ac5ad5 started to compress infomask bits in WAL records. Unfortunatelythe replay routines for XLOG_HEAP_LOCK/XLOG_HEAP2_LOCK_UPDATED forgot toreset the HEAP_XMAX_INVALID (and some other) hint bits.Luckily that's not problematic in the majority of cases, because after acrash/on a standby row locks aren't meaningful. Unfortunately that doesnot hold true in the presence of prepared transactions. This means thatafter a crash, or after promotion, row level locks held by a prepared,but not yet committed, prepared transaction might not be enforced.Discussion: 20160715192319.ubfuzim4zv3rqnxv@alap3.anarazel.deBackpatch: 9.3, the oldest branch on which0ac5ad5 is present.
1 parent6c243f9 commit46acbeb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7865,6 +7865,8 @@ heap_xlog_lock(XLogRecPtr lsn, XLogRecord *record)
78657865

78667866
htup= (HeapTupleHeader)PageGetItem(page,lp);
78677867

7868+
htup->t_infomask &= ~(HEAP_XMAX_BITS |HEAP_MOVED);
7869+
htup->t_infomask2 &= ~HEAP_KEYS_UPDATED;
78687870
fix_infomask_from_infobits(xlrec->infobits_set,&htup->t_infomask,
78697871
&htup->t_infomask2);
78707872

@@ -7925,6 +7927,8 @@ heap_xlog_lock_updated(XLogRecPtr lsn, XLogRecord *record)
79257927

79267928
htup= (HeapTupleHeader)PageGetItem(page,lp);
79277929

7930+
htup->t_infomask &= ~(HEAP_XMAX_BITS |HEAP_MOVED);
7931+
htup->t_infomask2 &= ~HEAP_KEYS_UPDATED;
79287932
fix_infomask_from_infobits(xlrec->infobits_set,&htup->t_infomask,
79297933
&htup->t_infomask2);
79307934
HeapTupleHeaderSetXmax(htup,xlrec->xmax);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp