Re: [HACKERS] pg_cancel_backend by non-superuser

2011-12-13 Thread Torello Querci
Hi Greg 2011/12/13 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

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 the

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-12-11 Thread Torello Querci
2011/12/6 Magnus Hagander : > On Sun, Oct 2, 2011 at 23:32, Tom Lane wrote: >> Noah Misch 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 wrote: > I see. What about passing this decision to DBA? I m

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: http://archives.postgresql

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-12-06 Thread Magnus Hagander
On Sun, Oct 2, 2011 at 23:32, Tom Lane wrote: > Noah Misch 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 >>> wrote: I see. What about passing this decision to DBA? I mean a GUC can_cancel_session =

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-10-02 Thread Tom Lane
Noah Misch 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 >> wrote: >>> I see. What about passing this decision to DBA? I mean a GUC >>> can_cancel_session = user, dbowner (default is '' -- only superuser). You

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-10-02 Thread Dimitri Fontaine
Noah Misch writes: >> >> On Fri, Sep 30, 2011 at 9:30 PM, Tom Lane ?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 ho

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 > wrote: > > On 01-10-2011 17:44, Daniel Farina wrote: > >> On Fri, Sep 30, 2011 at 9:30 PM, Tom Lane ?wrote: > >>> ISTM it would be reasonably non-controversial to allow users

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" ha scritto: > On Sat, Oct 1, 2011 at 10:11 PM, Euler Taveira de Oliveira > wrote: >> On 01-10-2011 17:44, Daniel Farina wrote: >>> >>> On Fri, Sep 30, 2011 at 9:30 PM, Tom Lane wrote: ISTM it would be reasonably non-contro

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 wrote: > On 01-10-2011 17:44, Daniel Farina wrote: >> >> On Fri, Sep 30, 2011 at 9:30 PM, Tom Lane  wrote: >>> >>> ISTM it would be reasonably non-controversial to allow users to issue >>> pg_cancel_backend against other sessions logged in

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 Lane 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

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 Daniel Farina
On Sat, Oct 1, 2011 at 3:47 PM, Kääriäinen Anssi 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 this problem that on

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 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 -- and there are

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-09-30 Thread Torello Querci
2011/10/1 Tom Lane : > Daniel Farina 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 >

Re: [HACKERS] pg_cancel_backend by non-superuser

2011-09-30 Thread Tom Lane
Daniel Farina 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 pg_cancel_backend as n

[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 hug