Re: cannot drop replication slot if server is running in single-usermode - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: cannot drop replication slot if server is running in single-usermode
Date
Msg-id 20180508145511.njhvmranf2wzz6it@alvherre.pgsql
Whole thread Raw
In response to Re: cannot drop replication slot if server is running in single-usermode  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Alvaro Herrera wrote:
> Robert Haas wrote:
> > On Thu, Mar 29, 2018 at 5:51 PM, Andres Freund <andres@anarazel.de> wrote:
> > >> > 2018-03-06 13:20:24.391 GMT [14869] ERROR:  epoll_ctl() failed: Bad file
> > >> > descriptor
> > >>
> > >> 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.
> > 
> > Mmmph.  I don't really think it's possible to view a user-visible
> > EBADF as anything other than a coding error.
> 
> IMO the problem is not the user-visible EBADF -- the problem is that the
> user might be attempting to clean up from some previous mistake by
> removing a replication slot.  Using single-user mode might be a strange
> tool, but it's not completely unreasonable.  Is it really all that
> difficult to fix slot acquisition for it?

Here's a patch (against pg10) to fix this problem.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: MAP syntax for arrays
Next
From: Tom Lane
Date:
Subject: Re: MAP syntax for arrays