File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -519,10 +519,14 @@ dmq_sender_main(Datum main_arg)
519
519
/* Idle --> Connecting */
520
520
if (conns [conn_id ].active && conns [conn_id ].state == Idle )
521
521
{
522
+ double pqtime ;
523
+
522
524
if (conns [conn_id ].pgconn )
523
525
PQfinish (conns [conn_id ].pgconn );
524
526
527
+ pqtime = dmq_now ();
525
528
conns [conn_id ].pgconn = PQconnectStart (conns [conn_id ].connstr );
529
+ mtm_log (DmqPqTiming , "[DMQ] [TIMING] pqs = %f ms" , dmq_now () - pqtime );
526
530
527
531
if (PQstatus (conns [conn_id ].pgconn ) == CONNECTION_BAD )
528
532
{
@@ -582,7 +586,12 @@ dmq_sender_main(Datum main_arg)
582
586
/* Await for connection establishment and call dmq_receiver_loop() */
583
587
case Connecting :
584
588
{
585
- PostgresPollingStatusType status = PQconnectPoll (conns [conn_id ].pgconn );
589
+ double pqtime ;
590
+ PostgresPollingStatusType status ;
591
+
592
+ pqtime = dmq_now ();
593
+ status = PQconnectPoll (conns [conn_id ].pgconn );
594
+ mtm_log (DmqPqTiming , "[DMQ] [TIMING] pqp = %f ms" , dmq_now () - pqtime );
586
595
587
596
mtm_log (DmqStateIntermediate ,
588
597
"[DMQ] Connecting: PostgresPollingStatusType = %d on %s" ,
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ typedef enum MtmLogTag
27
27
DmqTraceOutgoing = DEBUG2 ,
28
28
DmqTraceIncoming = DEBUG2 ,
29
29
DmqTraceShmMq = DEBUG1 ,
30
+ DmqPqTiming = LOG ,
30
31
31
32
/* resolver */
32
33
ResolverTasks = LOG ,
You can’t perform that action at this time.
0 commit comments