On Mon, Apr 25, 2016 at 7:57 PM, Stephen Frost <sfr...@snowman.net> wrote:
> David, Melvin, > > * David G. Johnston (david.g.johns...@gmail.com) wrote: > > On Monday, April 25, 2016, Melvin Davidson <melvin6...@gmail.com> wrote: > > > I need clarification on allow_system_table_mods parameter > > > Per the documentation: > > > *Allows modification of the structure of system tables.* This is used > by > > > initdb. This parameter can only be set at server start. > > > > > > However, attempting to modify pg_class to add another column fails with > > > "STATUS_ACCESS_VIOLATION" as below. > > > So either only certain system catalogs may be changed, or only certain > > > types of structure changes are allowed. > > There might be some things about system catalogs you can modify, but > generally speaking, you can't add a column or otherwise change the > structure. System catalogs are represented in memory by C structures > (and more), so it's not too surprising that adding a column causes a > crash. > > > If it's going to prevent the action it should be able to do so without > > crashing the server..and I doubt it's intended to be opinionated aside > from > > covering all DDL. What little there is on Google seems to support this. > > Sorry, but as a superuser, there's a lot of things you can do to crash > the server, this is just one way. The effort required to prevent > anything bad from happening when a user is running as a superuser is far > from trivial. > > In short, no, you can't just add a column to pg_class via SQL, and I > don't think we're going to be very interested in trying to "fix" such > cases. > > Thanks! > > Stephen > Thank you Stephen. Then could you please clarify exactly what structural mods are permitted by *"* *Allows modification of the structure of system tables" ?* -- *Melvin Davidson* I reserve the right to fantasize. Whether or not you wish to share my fantasy is entirely up to you.