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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: cannot drop replication slot if server is running in single-usermode
Дата
Msg-id 20180508143725.mn3ivlyvgpul6ovr@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: cannot drop replication slot if server is running in single-user mode  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: cannot drop replication slot if server is running in single-usermode  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
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?

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: cannot drop replication slot if server is running in single-user mode
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: MAP syntax for arrays