Re: [HACKERS] pg_cancel_backend by non-superuser

2011-12-13 Thread Torello Querci
Hi Greg 2011/12/13 Greg Smith g...@2ndquadrant.com: On 12/11/2011 05:29 PM, Torello Querci wrote: I will try to adjust the patch and submit for the next Commit Fest if this is ok for you. I don't think we'll need this, it will take a bit to explain why though. First, thanks for

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-12-12 Thread Greg Smith
On 12/11/2011 05:29 PM, Torello Querci wrote: I will try to adjust the patch and submit for the next Commit Fest if this is ok for you. I don't think we'll need this, it will take a bit to explain why though. First, thanks for returning this topic to discussion and keeping up with all

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-12-11 Thread Torello Querci
2011/12/6 Magnus Hagander mag...@hagander.net: On Sun, Oct 2, 2011 at 23:32, Tom Lane t...@sss.pgh.pa.us wrote: Noah Misch n...@leadboat.com writes: On Sun, Oct 02, 2011 at 06:55:51AM -0400, Robert Haas wrote: On Sat, Oct 1, 2011 at 10:11 PM, Euler Taveira de Oliveira eu...@timbira.com wrote:

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-12-10 Thread Greg Smith
On 10/02/2011 05:32 PM, Tom Lane wrote: I'm with Noah on this. If allowing same-user cancels is enough to solve 95% or 99% of the real-world use cases, let's just do that. And we're back full circle. This is basically where Josh Kuperschmidt started in early 2010:

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-12-06 Thread Magnus Hagander
On Sun, Oct 2, 2011 at 23:32, Tom Lane t...@sss.pgh.pa.us wrote: Noah Misch n...@leadboat.com writes: On Sun, Oct 02, 2011 at 06:55:51AM -0400, Robert Haas wrote: On Sat, Oct 1, 2011 at 10:11 PM, Euler Taveira de Oliveira eu...@timbira.com wrote: I see. What about passing this decision to

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-10-02 Thread Robert Haas
On Sat, Oct 1, 2011 at 10:11 PM, Euler Taveira de Oliveira eu...@timbira.com wrote: On 01-10-2011 17:44, Daniel Farina wrote: On Fri, Sep 30, 2011 at 9:30 PM, Tom Lanet...@sss.pgh.pa.us  wrote: ISTM it would be reasonably non-controversial to allow users to issue pg_cancel_backend against

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-10-02 Thread Torello Querci
I like this idea +1 Il giorno 02/ott/2011 12:56, Robert Haas robertmh...@gmail.com ha scritto: On Sat, Oct 1, 2011 at 10:11 PM, Euler Taveira de Oliveira eu...@timbira.com wrote: On 01-10-2011 17:44, Daniel Farina wrote: On Fri, Sep 30, 2011 at 9:30 PM, Tom Lanet...@sss.pgh.pa.us wrote:

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-10-02 Thread Noah Misch
On Sun, Oct 02, 2011 at 06:55:51AM -0400, Robert Haas wrote: On Sat, Oct 1, 2011 at 10:11 PM, Euler Taveira de Oliveira eu...@timbira.com wrote: On 01-10-2011 17:44, Daniel Farina wrote: On Fri, Sep 30, 2011 at 9:30 PM, Tom Lanet...@sss.pgh.pa.us ?wrote: ISTM it would be reasonably

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-10-02 Thread Dimitri Fontaine
Noah Misch n...@leadboat.com writes: On Fri, Sep 30, 2011 at 9:30 PM, Tom Lanet...@sss.pgh.pa.us ?wrote: ISTM it would be reasonably non-controversial to allow users to issue pg_cancel_backend against other sessions logged in as the same userID. The question is whether to go further than

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-10-02 Thread Tom Lane
Noah Misch n...@leadboat.com writes: On Sun, Oct 02, 2011 at 06:55:51AM -0400, Robert Haas wrote: On Sat, Oct 1, 2011 at 10:11 PM, Euler Taveira de Oliveira eu...@timbira.com wrote: I see. What about passing this decision to DBA? I mean a GUC can_cancel_session = user, dbowner (default is ''

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-10-01 Thread Daniel Farina
On Fri, Sep 30, 2011 at 9:30 PM, Tom Lane t...@sss.pgh.pa.us wrote: ISTM it would be reasonably non-controversial to allow users to issue pg_cancel_backend against other sessions logged in as the same userID. The question is whether to go further than that, and if so how much. In *every* case

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-10-01 Thread Daniel Farina
On Sat, Oct 1, 2011 at 3:47 PM, Kääriäinen Anssi anssi.kaariai...@thl.fi wrote: I would be a step in the right direction if the DB owner would see all queries to the DB in pg_stat_activity. All, including that of the superuser? I'd like to pass on that one, please. In general, I feel there is

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-10-01 Thread Kääriäinen Anssi
In *every* case -- and there are many -- where we've had people express pain, this would have sufficed. Usually the problem is a large index creation gone awry, or an automated backup process blocking a schema change that has taken half the locks it needs, or something like that -- all by the

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-10-01 Thread Euler Taveira de Oliveira
On 01-10-2011 17:44, Daniel Farina wrote: On Fri, Sep 30, 2011 at 9:30 PM, Tom Lanet...@sss.pgh.pa.us wrote: ISTM it would be reasonably non-controversial to allow users to issue pg_cancel_backend against other sessions logged in as the same userID. The question is whether to go further than

[HACKERS] pg_cancel_backend by non-superuser

2011-09-30 Thread Daniel Farina
This patch would appear(?) to have languished: https://commitfest.postgresql.org/action/patch_view?id=541 I'd really like to see it included. In the last comments of the review, there seem to be problems in *terminate* backend, but even just pg_cancel_backend as non-superuser would be just a

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-09-30 Thread Tom Lane
Daniel Farina dan...@heroku.com writes: This patch would appear(?) to have languished: https://commitfest.postgresql.org/action/patch_view?id=541 I'd really like to see it included. In the last comments of the review, there seem to be problems in *terminate* backend, but even just

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-09-30 Thread Torello Querci
2011/10/1 Tom Lane t...@sss.pgh.pa.us: Daniel Farina dan...@heroku.com writes: This patch would appear(?) to have languished: https://commitfest.postgresql.org/action/patch_view?id=541 I'd really like to see it included.  In the last comments of the review, there seem to be problems in