diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index e6fecc2c3f..375a98a6be 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -1458,7 +1458,12 @@ pgstat_reset_replslot_counter(const char *name) { ReplicationSlot *slot; - /* Existence check if the slot name is specified */ + /* + * Check if the slot exits with the given name. It is possible that + * by the time this message is executed the slot is dropped but at + * least this check will ensure that the given name is for a valid + * slot. + */ LWLockAcquire(ReplicationSlotControlLock, LW_SHARED); slot = SearchNamedReplicationSlot(name); LWLockRelease(ReplicationSlotControlLock); diff --git a/src/include/pgstat.h b/src/include/pgstat.h index cd4e5d9180..c0d805f501 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -360,7 +360,7 @@ typedef struct PgStat_MsgResetslrucounter /* ---------- * PgStat_MsgResetreplslotcounter Sent by the backend to tell the collector - * to reset replicatino slot counter(s) + * to reset replication slot counter(s) * ---------- */ typedef struct PgStat_MsgResetreplslotcounter