mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Don't fail for > 1 walsenders in 019_replslot_limit, add debug messages.
So far the first of the retries introduced inf28bf667f6resolves the issue. But I (Andres) am still suspicious that the start of the failures might indicate a problem. To reduce noise, stop reporting a failure if a retry resolves the problem. To allow figuring out what causes the slow slot drop, add a few more debug messages to ReplicationSlotDropPtr. See also commitafdeff1052,fe0972ee5eandf28bf667f6. Discussion: https://postgr.es/m/20220327213219.smdvfkq2fl74flow@alap3.anarazel.de
This commit is contained in:
@@ -702,8 +702,13 @@ ReplicationSlotDropPtr(ReplicationSlot *slot)
|
||||
slot->active_pid = 0;
|
||||
slot->in_use = false;
|
||||
LWLockRelease(ReplicationSlotControlLock);
|
||||
|
||||
elog(DEBUG3, "replication slot drop: %s: marked as not in use", NameStr(slot->data.name));
|
||||
|
||||
ConditionVariableBroadcast(&slot->active_cv);
|
||||
|
||||
elog(DEBUG3, "replication slot drop: %s: notified others", NameStr(slot->data.name));
|
||||
|
||||
/*
|
||||
* Slot is dead and doesn't prevent resource removal anymore, recompute
|
||||
* limits.
|
||||
@@ -711,6 +716,8 @@ ReplicationSlotDropPtr(ReplicationSlot *slot)
|
||||
ReplicationSlotsComputeRequiredXmin(false);
|
||||
ReplicationSlotsComputeRequiredLSN();
|
||||
|
||||
elog(DEBUG3, "replication slot drop: %s: computed required", NameStr(slot->data.name));
|
||||
|
||||
/*
|
||||
* If removing the directory fails, the worst thing that will happen is
|
||||
* that the user won't be able to create a new slot with the same name
|
||||
@@ -720,6 +727,8 @@ ReplicationSlotDropPtr(ReplicationSlot *slot)
|
||||
ereport(WARNING,
|
||||
(errmsg("could not remove directory \"%s\"", tmppath)));
|
||||
|
||||
elog(DEBUG3, "replication slot drop: %s: removed directory", NameStr(slot->data.name));
|
||||
|
||||
/*
|
||||
* Send a message to drop the replication slot to the stats collector.
|
||||
* Since there is no guarantee of the order of message transfer on a UDP
|
||||
|
||||
Reference in New Issue
Block a user