Skip to content

Commit 639886b

Browse files
committed
Establish connection with database in arbiter
1 parent f437110 commit 639886b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

contrib/mmts/arbiter.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,13 @@ static void MtmTransSender(Datum arg)
668668
sigfillset(&sset);
669669
sigprocmask(SIG_UNBLOCK, &sset, NULL);
670670

671+
/* We're now ready to receive signals */
672+
BackgroundWorkerUnblockSignals();
673+
674+
/* Connect to a database */
675+
BackgroundWorkerInitializeConnection(MtmDatabaseName, NULL);
676+
677+
671678
heartbeat_timer = RegisterTimeout(USER_TIMEOUT, MtmScheduleHeartbeat);
672679
enable_timeout_after(heartbeat_timer, MtmHeartbeatSendTimeout);
673680

@@ -755,6 +762,12 @@ static void MtmTransReceiver(Datum arg)
755762
sigfillset(&sset);
756763
sigprocmask(SIG_UNBLOCK, &sset, NULL);
757764

765+
/* We're now ready to receive signals */
766+
BackgroundWorkerUnblockSignals();
767+
768+
/* Connect to a database */
769+
BackgroundWorkerInitializeConnection(MtmDatabaseName, NULL);
770+
758771
MtmAcceptIncomingConnections();
759772

760773
for (i = 0; i < nNodes; i++) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy