Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8cde1eb

Browse files
committed
merge with mainstream multimaster
2 parents 52ee2e9 + 04a1922 commit 8cde1eb

File tree

11 files changed

+330
-129
lines changed

11 files changed

+330
-129
lines changed

contrib/mmts/arbiter.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,11 @@ static void MtmSender(Datum arg)
707707
{
708708
int nNodes = MtmMaxNodes;
709709
int i;
710+
MtmBuffer* txBuffer;
710711

711-
MtmBuffer* txBuffer = (MtmBuffer*)palloc0(sizeof(MtmBuffer)*nNodes);
712+
MtmBackgroundWorker = true;
713+
714+
txBuffer = (MtmBuffer*)palloc0(sizeof(MtmBuffer)*nNodes);
712715
MTM_ELOG(LOG, "Start arbiter sender %d", MyProcPid);
713716
InitializeTimeouts();
714717

@@ -795,6 +798,8 @@ static void MtmMonitor(Datum arg)
795798
pqsignal(SIGQUIT, SetStop);
796799
pqsignal(SIGTERM, SetStop);
797800

801+
MtmBackgroundWorker = true;
802+
798803
/* We're now ready to receive signals */
799804
BackgroundWorkerUnblockSignals();
800805

@@ -831,7 +836,9 @@ static void MtmReceiver(Datum arg)
831836
pqsignal(SIGINT, SetStop);
832837
pqsignal(SIGQUIT, SetStop);
833838
pqsignal(SIGTERM, SetStop);
834-
839+
840+
MtmBackgroundWorker = true;
841+
835842
/* We're now ready to receive signals */
836843
BackgroundWorkerUnblockSignals();
837844

@@ -1146,4 +1153,3 @@ static void MtmReceiver(Datum arg)
11461153
}
11471154
proc_exit(1); /* force restart of this bgwroker */
11481155
}
1149-

contrib/mmts/bgwpool.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ static void BgwPoolMainLoop(BgwPool* pool)
3636

3737
MTM_ELOG(LOG, "Start background worker %d, shutdown=%d", MyProcPid, pool->shutdown);
3838

39+
MtmBackgroundWorker = true;
3940
MtmIsLogicalReceiver = true;
4041
MtmPool = pool;
4142

0 commit comments

Comments
 (0)