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

Commite1b13cc

Browse files
simonat2ndQuadrantkelvich
authored andcommitted
Exit correctly from PrepareRedoRemove() when not found
Complex crash bug all started with this failure.Diagnosed and fixed by Nikhil Sontakke, reviewed by me.Reported-by: Jeff JanesAuthor: Nikhil SontakkeDiscussion:https://postgr.es/m/CAMkU=1xBP8cqdS5eK8APHL=X6RHMMM2vG5g+QamduuTsyCwv9g@mail.gmail.com
1 parentbfc79ee commite1b13cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/backend/access/transam/twophase.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2633,6 +2633,7 @@ PrepareRedoRemove(TransactionId xid, bool giveWarning)
26332633
{
26342634
GlobalTransactiongxact=NULL;
26352635
inti;
2636+
boolfound= false;
26362637

26372638
Assert(LWLockHeldByMeInMode(TwoPhaseStateLock,LW_EXCLUSIVE));
26382639
Assert(RecoveryInProgress());
@@ -2644,14 +2645,15 @@ PrepareRedoRemove(TransactionId xid, bool giveWarning)
26442645
if (gxact->xid==xid)
26452646
{
26462647
Assert(gxact->inredo);
2648+
found= true;
26472649
break;
26482650
}
26492651
}
26502652

26512653
/*
26522654
* Just leave if there is nothing, this is expected during WAL replay.
26532655
*/
2654-
if (gxact==NULL)
2656+
if (!found)
26552657
return;
26562658

26572659
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp