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

Commit5c53844

Browse files
committed
Fix broken Assert() introduced by8e9a16a
Don't assert MultiXactIdIsRunning if the multi came from a tuple thathad been share-locked and later copied over to the new cluster bypg_upgrade. Doing that causes an error to be raised unnecessarily:MultiXactIdIsRunning is not open to the possibility that its argumentcame from a pg_upgraded tuple, and all its other callers are alreadychecking; but such multis cannot, obviously, have transactions stillrunning, so the assert is pointless.Noticed while investigating the bogus pg_multixact/offsets/0000 fileleft over by pg_upgrade, as reported by Andres Freund inhttp://www.postgresql.org/message-id/20140530121631.GE25431@alap3.anarazel.deBackpatch to 9.3, as the commit that introduced the buglet.
1 parenta2db7b7 commit5c53844

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5326,8 +5326,14 @@ FreezeMultiXactId(MultiXactId multi, uint16 t_infomask,
53265326
* was a locker only, it can be removed without any further
53275327
* consideration; but if it contained an update, we might need to
53285328
* preserve it.
5329+
*
5330+
* Don't assert MultiXactIdIsRunning if the multi came from a
5331+
* pg_upgrade'd share-locked tuple, though, as doing that causes an
5332+
* error to be raised unnecessarily.
53295333
*/
5330-
Assert(!MultiXactIdIsRunning(multi));
5334+
Assert((!(t_infomask&HEAP_LOCK_MASK)&&
5335+
HEAP_XMAX_IS_LOCKED_ONLY(t_infomask))||
5336+
!MultiXactIdIsRunning(multi));
53315337
if (HEAP_XMAX_IS_LOCKED_ONLY(t_infomask))
53325338
{
53335339
*flags |=FRM_INVALIDATE_XMAX;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp