Re: Review of GetUserId() Usage

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Review of GetUserId() Usage
Date: 2014-09-24 20:58:24
Message-ID: 20140924205824.GU16422@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro,

* Alvaro Herrera (alvherre(at)2ndquadrant(dot)com) wrote:
> I think the case for pgstat_get_backend_current_activity() and
> pg_stat_get_activity and the other pgstatfuncs.c callers is easy to make
> and seems acceptable to me; but I would leave pg_signal_backend out of
> that discussion, because it has a potentially harmful side effect. By
> requiring SET ROLE you add an extra layer of protection against
> mistakes. (Hopefully, pg_signal_backend() is not a routine thing for
> well-run systems, which means human intervention, and therefore the room
> for error isn't insignificant.)

While I certainly understand where you're coming from, I don't really
buy into it. Yes, cancelling a query (the only thing normal users can
do anyway- they can't terminate backends) could mean the loss of any
in-progress work, but it's not like 'rm' and I don't see that it needs
to require extra hoops for individuals to go through.

Thanks!

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-09-24 21:32:59 Re: interval typmodout is broken
Previous Message Tom Lane 2014-09-24 20:44:15 Re: interval typmodout is broken