Re: [HACKERS] pg_terminate_backend can terminate background workersand autovacuum launchers

Поиск
Список
Период
Сортировка
От andres@anarazel.de (Andres Freund)
Тема Re: [HACKERS] pg_terminate_backend can terminate background workersand autovacuum launchers
Дата
Msg-id 20170622025221.77xgthbm4vozfnku@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: [HACKERS] pg_terminate_backend can terminate background workersand autovacuum launchers  (Yugo Nagata <nagata@sraoss.co.jp>)
Ответы Re: [HACKERS] pg_terminate_backend can terminate background workersand autovacuum launchers  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On 2017-06-22 11:49:47 +0900, Yugo Nagata wrote:
> On Wed, 21 Jun 2017 11:04:34 -0400
> Robert Haas <robertmhaas@gmail.com> wrote:
> 
> > On Wed, Jun 21, 2017 at 7:56 AM, Yugo Nagata <nagata@sraoss.co.jp> wrote:
> > > I have found that we can cancel/terminate autovacuum launchers and
> > > background worker processes by pg_cancel/terminate_backend function.
> > > I'm wondering this behavior is not expected and if not I want to fix it.
> > 
> > I think it is expected.  Even if we blocked it, those processes have
> > to cope gracefully with SIGTERM, because anyone with access to the OS
> > user can kill them that way by hand.
> 
> I agree that we can kill theses processes by the OS command. However,
> It seems to me that pg_{cancel,terminate}_backend don't need to be able to
> kill processes except for client backends because we can do same thing by
> the OS command if necessary, and acutually these functions cannot kill
> most other processes, for example, background writer. Are the autovacuum
> launcher and background worker special for these functions?

I strongly disagree with this - I think it's quite useful to be able to
kill things via SQL that can hold lock on database objects.   I'm not
seeing which problem would be solved by prohibiting this?

- Andres



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

Предыдущее
От: Yugo Nagata
Дата:
Сообщение: Re: [HACKERS] pg_terminate_backend can terminate background workersand autovacuum launchers
Следующее
От: Amit Langote
Дата:
Сообщение: Re: [HACKERS] Useless code in ExecInitModifyTable