Can we fix this issue like the following patch?
$git diff src/backend/access/transam/xlog.c diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 49ae97d4459..0fbdf6fd64a 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -8365,7 +8365,7 @@ CheckRecoveryConsistency(void) * run? If so, we can tell postmaster that the database is consistent now, * enabling connections. */ - if (standbyState == STANDBY_SNAPSHOT_READY && + if ((standbyState == STANDBY_SNAPSHOT_READY || standbyState == STANDBY_SNAPSHOT_PENDING) && !LocalHotStandbyActive && reachedConsistency && IsUnderPostmaster) At 2019-10-21 15:40:24, "Thunder" <thund...@126.com> wrote: Hi hackers, I found this issue when restart standby node and then try to connect it. It return "psql: FATAL: the database system is starting up". The steps to reproduce this issue. 1. Create a session to run uncommit_trans.sql 2. Create the other session to do checkpoint 3. Restart standby node. 4. standby node can not provide service even it has replayed all log files. I think the issue is in ProcArrayApplyRecoveryInfo function. The standby state is in STANDBY_SNAPSHOT_PENDING, but the lastOverflowedXid is not committed. Any idea to fix this issue? Thanks.