stop waiting when postmaster isn't alive

Signed-off-by: shipixian <shipixian_yewu@cmss.chinamobile.com>
This commit is contained in:
shipixian 2023-06-19 15:17:05 +08:00
parent 7dc5fd0303
commit d634773099

View File

@ -22,6 +22,7 @@
#include "storage/bufmgr.h"
#include "storage/ipc.h"
#include "storage/md.h"
#include "storage/pmsignal.h"
#include "storage/smgr.h"
#include "storage/filecache.h"
#include "postmaster/secondbuffer.h"
@ -790,7 +791,10 @@ smgrtruncatelsn(SMgrRelation reln, ForkNumber *forknum, int nforks, BlockNumber
else
minApplyLsn = He3DBQueryMinLsnFromAllStanby();
elog(LOG,"====pushlsn=%lx==lsn==%lx==\n",minApplyLsn,lsn);
CHECK_FOR_INTERRUPTS();
if (IsUnderPostmaster && !PostmasterIsAlive())
{
elog(FATAL, "stop waiting pushstandby because postmaster process isn't alive");
}
} while(minApplyLsn<lsn);
flag = true;
}