From: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "'David G(dot) Johnston *EXTERN*'" <david(dot)g(dot)johnston(at)gmail(dot)com> |
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:27:17 |
Message-ID: | A737B7A37273E048B164557ADEF4A58B5380465B@ntex2010i.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
David G. Johnston wrote:
>>>> 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.
>>> 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.
See http://www.postgresql.org/docs/current/static/planner-stats.html
"The amount of information stored in pg_statistic by ANALYZE, in particular the
maximum number of entries in the most_common_vals and histogram_bounds arrays
for each column, can be set on a column-by-column basis using the
ALTER TABLE SET STATISTICS command, or globally by setting the
default_statistics_target configuration variable."
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2016-02-29 16:58:24 | Re: Only owners can ANALYZE tables...seems overly restrictive |
Previous Message | David G. Johnston | 2016-02-29 16:15:00 | Re: Only owners can ANALYZE tables...seems overly restrictive |