Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-27 Thread Yugo Nagata
On Fri, 23 Jun 2017 19:43:35 -0400 Stephen Frost wrote: > Alvaro, all, > > * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > > Yugo Nagata wrote: > > > > > I tried to make it. Patch attached. > > > > > > It is easy and simple. Although I haven't tried for autovacuum

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-27 Thread Yugo Nagata
On Sat, 24 Jun 2017 08:09:52 +0900 Michael Paquier wrote: > On Sat, Jun 24, 2017 at 5:07 AM, Alvaro Herrera > wrote: > > Yugo Nagata wrote: > > > >> I tried to make it. Patch attached. > >> > >> It is easy and simple. Although I haven't tried

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-23 Thread Stephen Frost
Alvaro, all, * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > Yugo Nagata wrote: > > > I tried to make it. Patch attached. > > > > It is easy and simple. Although I haven't tried for autovacuum worker, > > I confirmed I can change other process' parameters without affecting others. > > Do

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-23 Thread Michael Paquier
On Sat, Jun 24, 2017 at 5:07 AM, Alvaro Herrera wrote: > Yugo Nagata wrote: > >> I tried to make it. Patch attached. >> >> It is easy and simple. Although I haven't tried for autovacuum worker, >> I confirmed I can change other process' parameters without affecting

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-23 Thread Alvaro Herrera
Yugo Nagata wrote: > I tried to make it. Patch attached. > > It is easy and simple. Although I haven't tried for autovacuum worker, > I confirmed I can change other process' parameters without affecting others. > Do you want this in PG? One advantage of this gadget is that you can signal

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-23 Thread Yugo Nagata
On Thu, 22 Jun 2017 14:08:30 +0900 Michael Paquier wrote: > On Thu, Jun 22, 2017 at 1:52 PM, Yugo Nagata wrote: > > On Thu, 22 Jun 2017 12:05:19 +0900 > > Michael Paquier wrote: > >> signal-able). Different thought, but

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-21 Thread Michael Paquier
On Thu, Jun 22, 2017 at 1:52 PM, Yugo Nagata wrote: > On Thu, 22 Jun 2017 12:05:19 +0900 > Michael Paquier wrote: >> signal-able). Different thought, but I'd love to see a SQL function >> that allows triggering SIGHUP on a specific process, like an

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-21 Thread Yugo Nagata
On Thu, 22 Jun 2017 12:05:19 +0900 Michael Paquier wrote: > On Thu, Jun 22, 2017 at 11:52 AM, Andres Freund wrote: > > On 2017-06-22 11:49:47 +0900, Yugo Nagata wrote: > >> I agree that we can kill theses processes by the OS command. However, > >>

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-21 Thread Michael Paquier
On Thu, Jun 22, 2017 at 11:52 AM, Andres Freund wrote: > On 2017-06-22 11:49:47 +0900, Yugo Nagata wrote: >> 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

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-21 Thread Andres Freund
On 2017-06-22 11:49:47 +0900, Yugo Nagata wrote: > On Wed, 21 Jun 2017 11:04:34 -0400 > Robert Haas wrote: > > > On Wed, Jun 21, 2017 at 7:56 AM, Yugo Nagata wrote: > > > I have found that we can cancel/terminate autovacuum launchers and > > >

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-21 Thread Yugo Nagata
On Wed, 21 Jun 2017 11:04:34 -0400 Robert Haas wrote: > On Wed, Jun 21, 2017 at 7:56 AM, Yugo Nagata wrote: > > I have found that we can cancel/terminate autovacuum launchers and > > background worker processes by pg_cancel/terminate_backend function.

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-21 Thread Alvaro Herrera
Yugo Nagata wrote: > However, we can terminate background workers by pg_terminate_backend. > In the following example, I terminated the logical replication launcher, > and this process did not appear again[1]. > > postgres=# select pg_terminate_backend(30902); > pg_terminate_backend >

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-21 Thread Robert Haas
On Wed, Jun 21, 2017 at 7:56 AM, Yugo Nagata 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

[HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-21 Thread Yugo Nagata
Hi, 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. The current pg_stat_activity shows background workers and autovacuum lancher as