Complex crash bug all started with this failure.
Diagnosed and fixed by Nikhil Sontakke, reviewed by me.
Reported-by: Jeff Janes
Author: Nikhil Sontakke
Discussion: https://postgr.es/m/CAMkU=1xBP8cqdS5eK8APHL=X6RHMMM2vG5g+QamduuTsyCwv9g@mail.gmail.com
{
GlobalTransaction gxact = NULL;
int i;
+ bool found = false;
Assert(RecoveryInProgress());
if (gxact->xid == xid)
{
Assert(gxact->inredo);
+ found = true;
break;
}
}
/*
* Just leave if there is nothing, this is expected during WAL replay.
*/
- if (gxact == NULL)
+ if (!found)
return;
/*