bug in ReplicationSlotsCountDBSlots

From: yamamoto(at)valinux(dot)co(dot)jp (YAMAMOTO Takashi)
To: pgsql-bugs(at)postgresql(dot)org
Cc: rhaas(at)postgresql(dot)org
Subject: bug in ReplicationSlotsCountDBSlots
Date: 2014-03-07 02:43:21
Message-ID: 20140307024321.B30CA71A41@kuma.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

hi,

the following fixes an obvious bug in ReplicationSlotsCountDBSlots
which prevents dropping unrelated databases.

YAMAMOTO Takashi

diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c
index 45ed7e4..76e5573 100644
--- a/src/backend/replication/slot.c
+++ b/src/backend/replication/slot.c
@@ -727,6 +727,7 @@ ReplicationSlotsCountDBSlots(Oid dboid, int *nslots, int *nactive)

/* not database specific, skip */
if (s->data.database == InvalidOid)
+ continue;

/* not our database, skip */
if (s->data.database != dboid)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2014-03-07 03:32:28 Re: BUG #9464: PANIC with 'failed to re-find shared lock object'
Previous Message Peter LaDow 2014-03-07 01:10:07 Re: BUG #9464: PANIC with 'failed to re-find shared lock object'