Re: cannot drop replication slot if server is running in single-user mode

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: cannot drop replication slot if server is running in single-user mode
Date: 2018-03-30 01:07:36
Message-ID: 20180330010736.GA8476@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 29, 2018 at 02:51:24PM -0700, Andres Freund wrote:
> On 2018-03-29 17:42:57 -0400, Bruce Momjian wrote:
> > On Tue, Mar 6, 2018 at 06:59:33PM +0530, tushar wrote:
> > > Hi,
> > >
> > > I found that if server is running in single-user mode , there we can create
> > > replication slot but cannot drop it .
> > >
> > > backend> SELECT * FROM pg_create_physical_replication_slot('p');
> > > 2018-03-06 13:20:03.441 GMT [14869] LOG:  statement: SELECT * FROM
> > > pg_create_physical_replication_slot('p');
> > >
> > >      1: slot_name    (typeid = 19, len = 64, typmod = -1, byval = f)
> > >      2: lsn    (typeid = 3220, len = 8, typmod = -1, byval = t)
> > >     ----
> > >      1: slot_name = "p"    (typeid = 19, len = 64, typmod = -1, byval = f)
> > >     ----
> > > backend> select pg_drop_replication_slot('p');
> > > 2018-03-06 13:20:24.390 GMT [14869] LOG:  statement: select
> > > pg_drop_replication_slot('p');
> > >
> > >      1: pg_drop_replication_slot    (typeid = 2278, len = 4, typmod = -1,
> > > byval = t)
> > >     ----
> > > 2018-03-06 13:20:24.391 GMT [14869] ERROR:  epoll_ctl() failed: Bad file
> > > descriptor
> > > 2018-03-06 13:20:24.391 GMT [14869] STATEMENT:  select
> > > pg_drop_replication_slot('p');
> >
> > I can confirm this bug exists in single-user mode.
>
> I'm not sure we need to do anything about this, personally. This seems
> like a fairly rare thing to do in a mode that's definitely not intended
> to be general purpose.

I think the question is whether this is exposing a bug or is expected
behavior.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-03-30 01:09:28 Re: cannot drop replication slot if server is running in single-user mode
Previous Message Kyotaro HORIGUCHI 2018-03-30 01:06:46 Re: [HACKERS] WAL logging problem in 9.4.3?