Re: about allow_system_table_mods and SET STATISTICS

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: about allow_system_table_mods and SET STATISTICS
Date: 2019-12-10 16:23:52
Message-ID: 8540.1575995032@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> 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.)

Yeah --- that way, the behavior would also be conveniently available
to other ALTER TABLE subcommands.

This patch looks good, with one trivial nitpick: it looks a bit odd
to insert the relkind check into ATExecSetStatistics between the
assignment of "newtarget" and the validity check for same. I'd
put it either before or after that whole stanza. Just a cosmetic
thing though.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2019-12-10 16:28:50 Re: Contention on LWLock buffer_content, due to SHARED lock(?)
Previous Message Tom Lane 2019-12-10 16:16:49 Re: Unicode normalization test broken output