From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | Melvin Davidson <melvin6925(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Clarify "allow_system_table_mods" |
Date: | 2016-04-25 23:57:20 |
Message-ID: | 20160425235720.GS10850@tamriel.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
David, Melvin,
* David G. Johnston (david(dot)g(dot)johnston(at)gmail(dot)com) wrote:
> On Monday, April 25, 2016, Melvin Davidson <melvin6925(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Melvin Davidson | 2016-04-25 23:58:46 | Re: Clarify "allow_system_table_mods" |
Previous Message | David G. Johnston | 2016-04-25 23:50:00 | Re: Clarify "allow_system_table_mods" |