Re: Only owners can ANALYZE tables...seems overly restrictive

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: "John R Pierce *EXTERN*" <pierce(at)hogranch(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Only owners can ANALYZE tables...seems overly restrictive
Date: 2016-02-29 16:15:00
Message-ID: CAKFQuwae3JT9Kc21UJ3CFEwiumGQCUT7kKREU90huJAohRy7nQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Feb 29, 2016 at 8:46 AM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
wrote:

> David G. Johnston wrote:
> > On Mon, Feb 29, 2016 at 2:52 AM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
> wrote:
> >> John R Pierce wrote:
> >>> analyze has arguably fewer side effects, its a performance enhancement,
> >>> its neither altering the schema or changing the data.
>
> >> In a production environment you don't want a user to change your table
> >> statistics.
> >>
> >> They could just set default_statistics_target to something stupid,
> >> run ANALYZE and wreck the statistics for everyone.
> >> And then come back to the DBA and complain that things don't work.
> >>
> >> We have a policy that users are not table owners, and with the
> >> current behaviour we can be certain that any bad table statistics
> >> are the fault of the DBA or wrong configuration.
>
> > ​Setting default_statistics_target and running ANALYZE are two entirely
> different things.
>
> Setting default_statistics_target affects the statistics computed by
> ANALYZE,
> so I cannot follow you here.
>
>
​Just because I can run ANALYZE doesn't mean I should be able to update the
statistic targets. While the features are related the permissions are not.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2016-02-29 16:27:17 Re: Only owners can ANALYZE tables...seems overly restrictive
Previous Message David G. Johnston 2016-02-29 16:13:49 Re: Only owners can ANALYZE tables...seems overly restrictive