提交 930f364b 编写于 作者: P Pengzhou Tang 提交者: Tang Pengzhou

Fix error that master and standby are never synchronized

GPDB used to allow command like "START_REPLICATION %X/%X [SYNC]" to
start a replication, user can specify SYNC option to skip waiting
synchronous in replications. Now start replication command is made
similar to upstream, the SYNC option is not supported, however, the
internal flag "synchronous" is still used and always be false which
make master and standby never synchronized.
上级 4047a90a
......@@ -142,7 +142,6 @@ SyncRepWaitForLSN(XLogRecPtr XactCommitLSN)
SpinLockAcquire(&walsnd->mutex);
syncStandbyPresent = (walsnd->pid != 0)
&& (walsnd->synchronous)
&& ((walsnd->state == WALSNDSTATE_STREAMING)
|| (walsnd->state == WALSNDSTATE_CATCHUP &&
walsnd->caughtup_within_range));
......
......@@ -2069,7 +2069,6 @@ InitWalSenderSlot(void)
walsnd->apply = InvalidXLogRecPtr;
walsnd->state = WALSNDSTATE_STARTUP;
/* Will be decided in hand-shake */
walsnd->synchronous = false;
walsnd->xlogCleanUpTo = InvalidXLogRecPtr;
walsnd->caughtup_within_range = false;
SpinLockRelease(&walsnd->mutex);
......@@ -2118,8 +2117,6 @@ WalSndKill(int code, Datum arg)
SpinLockAcquire(&MyWalSnd->mutex);
MyWalSnd->synchronous = false;
/* xlog can get freed without the WAL sender worry */
MyWalSnd->xlogCleanUpTo = InvalidXLogRecPtr;
......
......@@ -90,8 +90,6 @@ typedef struct WalSnd
*/
int sync_standby_priority;
bool synchronous;
/*
* Indicates whether the WalSnd represents a connection with a Greenplum
* mirror in streaming mode
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册