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

Commit c53a67c

Browse files
knizhnikkelvich
authored andcommitted
Establish connection with database in arbiter
1 parent 4b3a499 commit c53a67c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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)