walproposer: move CHECK_FOR_INTERRUPTS to after waiting.

We should check it always after a sleep even before starting streaming.
This commit is contained in:
Arseny Sher
2024-06-18 16:29:54 +03:00
parent 62c0c1d797
commit 73a525de62
2 changed files with 2 additions and 6 deletions

View File

@@ -286,7 +286,6 @@ WalProposerPoll(WalProposer *wp)
void
WalProposerStart(WalProposer *wp)
{
/* Initiate connections to all safekeeper nodes */
for (int i = 0; i < wp->n_safekeepers; i++)
{

View File

@@ -1270,13 +1270,8 @@ WalSndLoop(WalProposer *wp)
{
XLogRecPtr flushPtr;
/* Clear any already-pending wakeups */
ResetLatch(MyLatch);
for (;;)
{
CHECK_FOR_INTERRUPTS();
XLogBroadcastWalProposer(wp);
WalProposerPoll(wp);
}
@@ -1807,6 +1802,8 @@ walprop_pg_wait_event_set(WalProposer *wp, long timeout, Safekeeper **sk, uint32
late_cv_trigger = ConditionVariableCancelSleep();
#endif
CHECK_FOR_INTERRUPTS();
/*
* Process config if requested. This restarts walproposer if safekeepers
* list changed. Don't do that for sync-safekeepers because quite probably