提交 33a64335 编写于 作者: A Ashwin Agrawal

Remove code checking for am_walsender in SyncRepWaitForLSN()

No reason to call `SyncRepWaitForLSN()` from walsender process itself. Some
existed in past seems which performed the same, even if walsender for whatever
reason needs to perform transaction shouldn't result in wrtitng
anything. Replaced the if with assertion instead to catch any viaolations of the
assumption.
上级 34971f37
......@@ -117,24 +117,11 @@ SyncRepWaitForLSN(XLogRecPtr XactCommitLSN)
{
return;
}
Assert(!am_walsender);
elogif(debug_walrepl_syncrep, LOG,
"syncrep wait -- This backend's commit LSN for syncrep is %X/%X.",
XactCommitLSN.xlogid,XactCommitLSN.xrecoff);
/* GPDB_91_MERGE_FIXME: is this still relevant after PT and filerep removal? */
/*
* Walsenders are not supposed to call this function, but currently
* basebackup needs to access catalog, hence open/close transaction.
* It doesn't make sense to wait for myself anyway.
*/
if (am_walsender)
{
elogif(debug_walrepl_syncrep, LOG,
"syncrep wait -- Not waiting for syncrep as this process is a walsender.");
return;
}
/* Fast exit if user has not requested sync replication. */
if (!SyncRepRequested())
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册