From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | 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 20:00:01 |
Message-ID: | 571E7741.3000209@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 04/25/2016 09:30 AM, Melvin Davidson 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.
I am reading the above as meaning that the parameter only takes affect
if it has been set in the conf file and you then initdb a new database
cluster. So is that what you did or did you add the parameter to a
previously initialized cluster conf file?
>
> 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.
> eg: add indexes, triggers
>
> Windows 10
> PostgreSQL 9.2.15, compiled by Visual C++ build 1600, 32-bit
>
> Current user is postgres
> allow_system_table_mods = on
>
> ALTER TABLE pg_catalog.pg_class ADD COLUMN relcreated timestamp DEFAULT
> current_timestamp;
>
> Fails with:
>
> 2016-04-25 12:08:00 EDT STATEMENT: ALTER TABLE pg_catalog.pgclass ADD
> COLUMN relcreated timestamp DEFAULT current_timestamp;
> 2016-04-25 12:08:14 EDT LOG: server process (PID 7760) was terminated
> by exception 0xC0000005
> 2016-04-25 12:08:14 EDT DETAIL: Failed process was running: ALTER TABLE
> pg_catalog.pg_class ADD COLUMN relcreated timestamp DEFAULT
> current_timestamp;
> 2016-04-25 12:08:14 EDT HINT: See C include file "ntstatus.h" for a
> description of the hexadecimal value.
> 2016-04-25 12:08:14 EDT LOG: terminating any other active server processes
>
> From ntstatus.h
> *#define STATUS_ACCESS_VIOLATION ((NTSTATUS)0xC0000005L) //
> winnt*
>
> --
> *Melvin Davidson*
> I reserve the right to fantasize. Whether or not you
> wish to share my fantasy is entirely up to you.
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2016-04-25 20:05:20 | Re: Clarify "allow_system_table_mods" |
Previous Message | Guillaume Lelarge | 2016-04-25 17:24:46 | Re: Types of blocks in the `pg_stat_statements` |