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

Commitee01f70

Browse files
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 parentaa203e7 commitee01f70

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
@@ -2375,6 +2375,7 @@ PrepareRedoRemove(TransactionId xid, bool giveWarning)
23752375
{
23762376
GlobalTransactiongxact=NULL;
23772377
inti;
2378+
boolfound= false;
23782379

23792380
Assert(RecoveryInProgress());
23802381

@@ -2386,6 +2387,7 @@ PrepareRedoRemove(TransactionId xid, bool giveWarning)
23862387
if (gxact->xid==xid)
23872388
{
23882389
Assert(gxact->inredo);
2390+
found= true;
23892391
break;
23902392
}
23912393
}
@@ -2394,7 +2396,7 @@ PrepareRedoRemove(TransactionId xid, bool giveWarning)
23942396
/*
23952397
* Just leave if there is nothing, this is expected during WAL replay.
23962398
*/
2397-
if (gxact==NULL)
2399+
if (!found)
23982400
return;
23992401

24002402
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp