Re: about allow_system_table_mods and SET STATISTICS

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-12-10T12:41:28Z
Lists: pgsql-hackers

Attachments

On 2019-12-05 00:16, Tom Lane wrote:
> Seems reasonable.  The argument for making this an exception to
> allow_system_table_mods was always more about expediency than logical
> cleanliness.  After the recent changes I think it's okay to remove the
> special case (especially since nobody has griped about it being broken).
> 
> However ... if we're not going to have that special case, couldn't
> we get rid of the whole business of having a special permissions test?
> What is it that ATSimplePermissions can't handle here?  The business
> about requiring a colName certainly doesn't need to be done before the
> ownership check (in fact, it could be left to execution, so we don't need
> a prep function at all anymore).

Good point.  Done in the attached patch.

(If someone wanted to revive the original functionality, it would 
nowadays probably be easier to add a flag ATT_SYSTEM_TABLE to 
ATSimplePermissions(), so there is really no reason to keep the old 
function separate.)

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Commits

  1. Remove ATPrepSetStatistics

  2. Improve behavior of concurrent ALTER TABLE, and do some refactoring.