@@ -177,10 +177,6 @@ ReplicationSlotInitialize(void)
177
177
static void
178
178
ReplicationSlotShmemExit (int code , Datum arg )
179
179
{
180
- /* temp debugging aid to analyze 019_replslot_limit failures */
181
- elog (DEBUG3 , "replication slot exit hook, %s active slot" ,
182
- MyReplicationSlot != NULL ? "with" : "without" );
183
-
184
180
/* Make sure active replication slots are released */
185
181
if (MyReplicationSlot != NULL )
186
182
ReplicationSlotRelease ();
@@ -582,9 +578,6 @@ ReplicationSlotCleanup(void)
582
578
Assert (MyReplicationSlot == NULL );
583
579
584
580
restart :
585
- /* temp debugging aid to analyze 019_replslot_limit failures */
586
- elog (DEBUG3 , "temporary replication slot cleanup: begin" );
587
-
588
581
LWLockAcquire (ReplicationSlotControlLock , LW_SHARED );
589
582
for (i = 0 ; i < max_replication_slots ; i ++ )
590
583
{
@@ -593,10 +586,6 @@ ReplicationSlotCleanup(void)
593
586
if (!s -> in_use )
594
587
continue ;
595
588
596
- /* unlocked read of active_pid is ok for debugging purposes */
597
- elog (DEBUG3 , "temporary replication slot cleanup: %d in use, active_pid: %d" ,
598
- i , (int ) s -> active_pid );
599
-
600
589
SpinLockAcquire (& s -> mutex );
601
590
if (s -> active_pid == MyProcPid )
602
591
{
@@ -614,8 +603,6 @@ ReplicationSlotCleanup(void)
614
603
}
615
604
616
605
LWLockRelease (ReplicationSlotControlLock );
617
-
618
- elog (DEBUG3 , "temporary replication slot cleanup: done" );
619
606
}
620
607
621
608
/*
@@ -657,9 +644,6 @@ ReplicationSlotDropPtr(ReplicationSlot *slot)
657
644
char path [MAXPGPATH ];
658
645
char tmppath [MAXPGPATH ];
659
646
660
- /* temp debugging aid to analyze 019_replslot_limit failures */
661
- elog (DEBUG3 , "replication slot drop: %s: begin" , NameStr (slot -> data .name ));
662
-
663
647
/*
664
648
* If some other backend ran this code concurrently with us, we might try
665
649
* to delete a slot with a certain name while someone else was trying to
@@ -710,9 +694,6 @@ ReplicationSlotDropPtr(ReplicationSlot *slot)
710
694
path , tmppath )));
711
695
}
712
696
713
- elog (DEBUG3 , "replication slot drop: %s: removed on-disk" ,
714
- NameStr (slot -> data .name ));
715
-
716
697
/*
717
698
* The slot is definitely gone. Lock out concurrent scans of the array
718
699
* long enough to kill it. It's OK to clear the active PID here without
@@ -726,22 +707,15 @@ ReplicationSlotDropPtr(ReplicationSlot *slot)
726
707
slot -> active_pid = 0 ;
727
708
slot -> in_use = false;
728
709
LWLockRelease (ReplicationSlotControlLock );
729
-
730
- elog (DEBUG3 , "replication slot drop: %s: marked as not in use" , NameStr (slot -> data .name ));
731
-
732
710
ConditionVariableBroadcast (& slot -> active_cv );
733
711
734
- elog (DEBUG3 , "replication slot drop: %s: notified others" , NameStr (slot -> data .name ));
735
-
736
712
/*
737
713
* Slot is dead and doesn't prevent resource removal anymore, recompute
738
714
* limits.
739
715
*/
740
716
ReplicationSlotsComputeRequiredXmin (false);
741
717
ReplicationSlotsComputeRequiredLSN ();
742
718
743
- elog (DEBUG3 , "replication slot drop: %s: computed required" , NameStr (slot -> data .name ));
744
-
745
719
/*
746
720
* If removing the directory fails, the worst thing that will happen is
747
721
* that the user won't be able to create a new slot with the same name
@@ -751,8 +725,6 @@ ReplicationSlotDropPtr(ReplicationSlot *slot)
751
725
ereport (WARNING ,
752
726
(errmsg ("could not remove directory \"%s\"" , tmppath )));
753
727
754
- elog (DEBUG3 , "replication slot drop: %s: removed directory" , NameStr (slot -> data .name ));
755
-
756
728
/*
757
729
* Drop the statistics entry for the replication slot. Do this while
758
730
* holding ReplicationSlotAllocationLock so that we don't drop a
@@ -767,9 +739,6 @@ ReplicationSlotDropPtr(ReplicationSlot *slot)
767
739
* a slot while we're still cleaning up the detritus of the old one.
768
740
*/
769
741
LWLockRelease (ReplicationSlotAllocationLock );
770
-
771
- elog (DEBUG3 , "replication slot drop: %s: done" ,
772
- NameStr (slot -> data .name ));
773
742
}
774
743
775
744
/*
@@ -1329,12 +1298,6 @@ InvalidatePossiblyObsoleteSlot(ReplicationSlot *s, XLogRecPtr oldestLSN,
1329
1298
(void ) kill (active_pid , SIGTERM );
1330
1299
last_signaled_pid = active_pid ;
1331
1300
}
1332
- else
1333
- {
1334
- /* temp debugging aid to analyze 019_replslot_limit failures */
1335
- elog (DEBUG3 , "not signalling process %d during invalidation of slot \"%s\"" ,
1336
- active_pid , NameStr (slotname ));
1337
- }
1338
1301
1339
1302
/* Wait until the slot is released. */
1340
1303
ConditionVariableSleep (& s -> active_cv ,
@@ -1398,10 +1361,6 @@ InvalidateObsoleteReplicationSlots(XLogSegNo oldestSegno)
1398
1361
XLogSegNoOffsetToRecPtr (oldestSegno , 0 , wal_segment_size , oldestLSN );
1399
1362
1400
1363
restart :
1401
- /* temp debugging aid to analyze 019_replslot_limit failures */
1402
- elog (DEBUG3 , "begin invalidating obsolete replication slots older than %X/%X" ,
1403
- LSN_FORMAT_ARGS (oldestLSN ));
1404
-
1405
1364
LWLockAcquire (ReplicationSlotControlLock , LW_SHARED );
1406
1365
for (int i = 0 ; i < max_replication_slots ; i ++ )
1407
1366
{
@@ -1427,8 +1386,6 @@ InvalidateObsoleteReplicationSlots(XLogSegNo oldestSegno)
1427
1386
ReplicationSlotsComputeRequiredLSN ();
1428
1387
}
1429
1388
1430
- elog (DEBUG3 , "done invalidating obsolete replication slots" );
1431
-
1432
1389
return invalidated ;
1433
1390
}
1434
1391
0 commit comments