From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Gurjeet Singh <singh.gurjeet@gmail.com>
Cc: PGSQL Bugs <pgsql-bugs@postgresql.org>
Subject: Re: superuser unable to modify settings of a system table
Date: Fri, 04 Jun 2010 16:53:36 -0400
Message-ID: <23387.1275684816@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTimK0wRwr42tDQfF6N4QzdxdAaCF6pCQH_jsxYje@mail.gmail.com>
References: <AANLkTikMyIgws7xbwSzt9aXbdZynDqvVoubH6MG_wJBP@mail.gmail.com>
<6649.1275584543@sss.pgh.pa.us>
<AANLkTilTjK0E0w_mWlT54vAn50i_JXW1idTVc-yA8aQg@mail.gmail.com>
<7060.1275585689@sss.pgh.pa.us>
<AANLkTimK0wRwr42tDQfF6N4QzdxdAaCF6pCQH_jsxYje@mail.gmail.com>
Robert Haas <robertmhaas@gmail.com> writes:
> Personally, I think it would be better to put some work into making
> allow_system_table_mods a little less simple-minded. Right now,
> !allow_system_table_mods prohibits you from doing perfectly sensible
> things (as in the OP's original example) yet still allows you to do
> things that are totally nuts (like DELETE FROM pg_class, which causes
> every subsequent connection attempt for that database to panic).
> Perfection may be too much to ask for but I'd take "modest
> improvement"...
Nope, that is the wrong viewpoint entirely. allow_system_table_mods
is intended to prevent you from modifying the *structure* of the
system catalogs, which is fairly critical because the backend C code
tends to depend on that. Modifying the *content* of the catalogs
is another matter, and in fact we let any superuser do that without
having set allow_system_table_mods. There is no practical way to
distinguish a benign catalog-content change from a disastrous one,
so we don't try.
It's possible that reloptions is a special case and we should treat it
as being more nearly in the content than structure category. Not sure.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, singh.gurjeet@gmail.com
Subject: Re: superuser unable to modify settings of a system table
In-Reply-To: <23387.1275684816@sss.pgh.pa.us>
References: <AANLkTikMyIgws7xbwSzt9aXbdZynDqvVoubH6MG_wJBP@mail.gmail.com> <6649.1275584543@sss.pgh.pa.us> <AANLkTilTjK0E0w_mWlT54vAn50i_JXW1idTVc-yA8aQg@mail.gmail.com> <7060.1275585689@sss.pgh.pa.us> <AANLkTimK0wRwr42tDQfF6N4QzdxdAaCF6pCQH_jsxYje@mail.gmail.com> <23387.1275684816@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox