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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Bruce Momjian <bruce(at)momjian(dot)us>, 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-05-08 14:37:25
Message-ID: 20180508143725.mn3ivlyvgpul6ovr@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> On Thu, Mar 29, 2018 at 5:51 PM, Andres Freund <andres(at)anarazel(dot)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?

I agree with Tom that for any other operation we can just reject it
early if not under postmaster, but dropping a slot seems a special case.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Gierth 2018-05-08 14:37:28 Re: MAP syntax for arrays
Previous Message Tom Lane 2018-05-08 14:31:59 Re: cannot drop replication slot if server is running in single-user mode