Re: Only owners can ANALYZE tables...seems overly restrictive - Mailing list pgsql-general

From Stephen Frost
Subject Re: Only owners can ANALYZE tables...seems overly restrictive
Date
Msg-id 20160324115119.GW3127@tamriel.snowman.net
Whole thread Raw
In response to Re: Only owners can ANALYZE tables...seems overly restrictive  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Only owners can ANALYZE tables...seems overly restrictive  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
David,

* David G. Johnston (david.g.johnston@gmail.com) wrote:
> Which means that, aside from effort, the main blocking factors here are
> code complexity (which I understand) and limited grant "bits" as Stephen
> puts it.  So I pose the question: do any of the committers consider a grant
> bit too valuable to consume on an ANALYZE grant?

I wasn't referring to "bits" as "things" to do but rather as actual
zeros and ones- AclMode is a 32bit integer, of which the bottom half are
'regular' grantable rights and the top half are "with grant option"
indications, meanly we've only got 16 to work with, and every object
uses AclMode, so we have to support *all* kinds of GRANTs with those 16
bits.

See src/include/nodes/parsenodes.h, around line 63.

> If that and/or general code complexity means this will not be added even if
> a patch was proposed for 9.7 then I'll move on and institute one of the
> hacks that has been proffered.  Otherwise I have (more than) half a mind to
> find some way to get a patch written.

I don't see any reason why the patch itself would be terribly difficult,
but are we sure we'd want just ANALYZE and not VACUUM also?  Which would
have to be another bit, since those are pretty different actions.

The question really is- what other things might we want as grantable
rights in the future?  Once these 16 bits are gone, it's a whole bunch
of work to get more.

Thanks!

Stephen

Attachment

pgsql-general by date:

Previous
From: Moreno Andreo
Date:
Subject: Re: PostgreSQL crash with PANIC message
Next
From: Adrian Klaver
Date:
Subject: Re: Multixacts wraparound monitoring