pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedbug in ReplicationSlotsCountDBSlots
4+ messages / 3 participants
[nested] [flat]
* bug in ReplicationSlotsCountDBSlots
@ 2014-03-07 02:43 YAMAMOTO Takashi <yamamoto@valinux.co.jp>
2014-03-07 16:18 ` Re: bug in ReplicationSlotsCountDBSlots Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 4+ messages in thread
From: yamamoto@valinux.co.jp @ 2014-03-07 02:43 UTC (permalink / raw)
To: pgsql-bugs; +Cc: rhaas@postgresql.org
hi,
the following fixes an obvious bug in ReplicationSlotsCountDBSlots
which prevents dropping unrelated databases.
YAMAMOTO Takashi
inline patch 1: src/backend/replication/slot.c (+1/-0 lines) download inline-1.patch
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)
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: bug in ReplicationSlotsCountDBSlots
2014-03-07 02:43 bug in ReplicationSlotsCountDBSlots YAMAMOTO Takashi <yamamoto@valinux.co.jp>
@ 2014-03-07 16:18 ` Bruce Momjian <bruce@momjian.us>
2014-03-07 16:22 ` Re: bug in ReplicationSlotsCountDBSlots Andres Freund <andres@2ndquadrant.com>
0 siblings, 1 reply; 4+ messages in thread
From: Bruce Momjian @ 2014-03-07 16:18 UTC (permalink / raw)
To: YAMAMOTO Takashi <yamamoto@valinux.co.jp>; +Cc: pgsql-bugs; rhaas@postgresql.org
On Fri, Mar 7, 2014 at 11:43:21AM +0900, YAMAMOTO Takashi wrote:
> hi,
>
> the following fixes an obvious bug in ReplicationSlotsCountDBSlots
> which prevents dropping unrelated databases.
Yikes, the code is literally:
/* not database specific, skip */
if (s->data.database == InvalidOid)
How did that get by the reviewers?
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: bug in ReplicationSlotsCountDBSlots
2014-03-07 02:43 bug in ReplicationSlotsCountDBSlots YAMAMOTO Takashi <yamamoto@valinux.co.jp>
2014-03-07 16:18 ` Re: bug in ReplicationSlotsCountDBSlots Bruce Momjian <bruce@momjian.us>
@ 2014-03-07 16:22 ` Andres Freund <andres@2ndquadrant.com>
2014-03-07 16:42 ` Re: bug in ReplicationSlotsCountDBSlots Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 4+ messages in thread
From: Andres Freund @ 2014-03-07 16:22 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; +Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>; pgsql-bugs; rhaas@postgresql.org
On 2014-03-07 11:18:04 -0500, Bruce Momjian wrote:
> On Fri, Mar 7, 2014 at 11:43:21AM +0900, YAMAMOTO Takashi wrote:
> > hi,
> >
> > the following fixes an obvious bug in ReplicationSlotsCountDBSlots
> > which prevents dropping unrelated databases.
Thanks, that's obviously a mistake!
> Yikes, the code is literally:
>
> /* not database specific, skip */
> if (s->data.database == InvalidOid)
>
> How did that get by the reviewers?
It's a huge patch, and it changed a lot to accomodate review and to
rebase onto new versions. I think I introduced that bug when rebasing
the decoding functionality onto the already committed slot
functionality. Since it doesn't cause any obvious problems in many
scenarios..
Can you push that fix?
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: bug in ReplicationSlotsCountDBSlots
2014-03-07 02:43 bug in ReplicationSlotsCountDBSlots YAMAMOTO Takashi <yamamoto@valinux.co.jp>
2014-03-07 16:18 ` Re: bug in ReplicationSlotsCountDBSlots Bruce Momjian <bruce@momjian.us>
2014-03-07 16:22 ` Re: bug in ReplicationSlotsCountDBSlots Andres Freund <andres@2ndquadrant.com>
@ 2014-03-07 16:42 ` Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 4+ messages in thread
From: Bruce Momjian @ 2014-03-07 16:42 UTC (permalink / raw)
To: Andres Freund <andres@2ndquadrant.com>; +Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>; pgsql-bugs; rhaas@postgresql.org
On Fri, Mar 7, 2014 at 05:22:03PM +0100, Andres Freund wrote:
> On 2014-03-07 11:18:04 -0500, Bruce Momjian wrote:
> > On Fri, Mar 7, 2014 at 11:43:21AM +0900, YAMAMOTO Takashi wrote:
> > > hi,
> > >
> > > the following fixes an obvious bug in ReplicationSlotsCountDBSlots
> > > which prevents dropping unrelated databases.
>
> Thanks, that's obviously a mistake!
>
> > Yikes, the code is literally:
> >
> > /* not database specific, skip */
> > if (s->data.database == InvalidOid)
> >
> > How did that get by the reviewers?
>
> It's a huge patch, and it changed a lot to accomodate review and to
> rebase onto new versions. I think I introduced that bug when rebasing
> the decoding functionality onto the already committed slot
> functionality. Since it doesn't cause any obvious problems in many
> scenarios..
>
> Can you push that fix?
Done, thanks.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2014-03-07 16:42 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-03-07 02:43 bug in ReplicationSlotsCountDBSlots YAMAMOTO Takashi <yamamoto@valinux.co.jp>
2014-03-07 16:18 ` Bruce Momjian <bruce@momjian.us>
2014-03-07 16:22 ` Andres Freund <andres@2ndquadrant.com>
2014-03-07 16:42 ` Bruce Momjian <bruce@momjian.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox