Re: Clarify "allow_system_table_mods"

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Clarify "allow_system_table_mods"
Дата
Msg-id 20160425235720.GS10850@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Clarify "allow_system_table_mods"  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Clarify "allow_system_table_mods"  (Melvin Davidson <melvin6925@gmail.com>)
Список pgsql-general
David, Melvin,

* David G. Johnston (david.g.johnston@gmail.com) wrote:
> On Monday, April 25, 2016, Melvin Davidson <melvin6925@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

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Clarify "allow_system_table_mods"
Следующее
От: Melvin Davidson
Дата:
Сообщение: Re: Clarify "allow_system_table_mods"