Skip to content

Commit 137e4da

Browse files
committed
Allow interrupting GetMultiXactIdMembers
This function has a loop which can lead to uninterruptible process "stalls" (actually infinite loops) when some bugs are triggered. Avoid that unpleasant situation by adding a check for interrupts in a place that shouldn't degrade performance in the normal case. Backpatch to 9.3. Older branches have an identical loop here, but the aforementioned bugs are only a problem starting in 9.3 so there doesn't seem to be any point in backpatching any further.
1 parent 16695d6 commit 137e4da

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/backend/access/transam/multixact.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,6 +1258,7 @@ GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **members,
12581258
{
12591259
/* Corner case 2: next multixact is still being filled in */
12601260
LWLockRelease(MultiXactOffsetControlLock);
1261+
CHECK_FOR_INTERRUPTS();
12611262
pg_usleep(1000L);
12621263
goto retry;
12631264
}

0 commit comments

Comments
 (0)