提交 ea196b2f 编写于 作者: J Jimmy Yih

Remove early exit in RequestXLogStreaming

When WalRcv's walRcvState is not WALRCV_STOPPED, we do early exit. This early
exit is not in upstream Postgres and is legacy Greenplum code. This prevented
timeline switch scenario from happening correctly because WAL receiver's state
is set to WALRCV_WAITING expecting to wake itself up with SetLatch or
PMSIGNAL_START_WALRECEIVER signal call at the end of RequestXLogStreaming()
call.
Co-authored-by: NPaul Guo <pguo@pivotal.io>
上级 a371bcfc
......@@ -248,18 +248,6 @@ RequestXLogStreaming(TimeLineID tli, XLogRecPtr recptr, const char *conninfo,
bool launch = false;
pg_time_t now = (pg_time_t) time(NULL);
/*
* If it's not stopped, nothing to do.
*/
if (walrcv->walRcvState != WALRCV_STOPPED)
{
elogif(debug_xlog_record_read, LOG,
"request streaming -- walreceiver state is %s. Hence, no need "
"to request streaming.", WalRcvGetStateString(walrcv->walRcvState));
return;
}
/*
* We always start at the beginning of the segment. That prevents a broken
* segment (i.e., with no records in the first half of a segment) from
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册