From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <rhaas(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [COMMITTERS] pgsql: Add a hook in ExecCheckRTPerms(). |
Date: | 2010-07-09 17:38:52 |
Message-ID: | 1278697132.29736.843.camel@ebony |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Fri, 2010-07-09 at 13:21 -0400, Tom Lane wrote:
> > Agreed that permission checks should logically be applied at
> execution
> > time. I am proposing a performance optimisation, not a change in
> > behaviour.
>
> Except that it *is* a change in behavior: the first check will occur
> too
> soon.
Sooner matters why? We already have a lock on the table at plan time so
there cannot be a concurrent GRANT against a plan-then-execute
transaction. Later transactions would invalidate and replan.
> The fact that we're interested in adding plugin permissions checking
> pretty much destroys the idea anyway. You cannot assume that a plan
> cache invalidation will happen for any change in external state that
> a plugin might be consulting.
Plugin can still be executed at appropriate time, its mostly absent and
so cheap. I guess we can keep plugin whatever else I attempt.
> > The proposed performance enhancement would be very useful since we
> have
> > to check permissions of functions, views, tables and every other
> aspect.
> > We could spend a while quantifying that overhead, though "non-zero"
> is
> > all we need to know.
>
> No, it's not all we need to know. If you can't prove the overhead
> involved here is significant, we should not be expending effort and
> creating subtle behavioral changes in pursuit of a minor optimization.
OK, will gather evidence.
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Training and Services
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2010-07-09 17:44:26 | Re: [COMMITTERS] pgsql: Add a hook in ExecCheckRTPerms(). |
Previous Message | Robert Haas | 2010-07-09 17:33:26 | Re: [COMMITTERS] pgsql: Add a hook in ExecCheckRTPerms(). |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2010-07-09 17:44:26 | Re: [COMMITTERS] pgsql: Add a hook in ExecCheckRTPerms(). |
Previous Message | Robert Haas | 2010-07-09 17:33:26 | Re: [COMMITTERS] pgsql: Add a hook in ExecCheckRTPerms(). |