Re: superuser unable to modify settings of a system table

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>, PGSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: superuser unable to modify settings of a system table
Date: 2010-06-04 21:57:12
Message-ID: AANLkTilHlel5pm8EmGKc8vgIK1tPjzPHL0twn3lOr2fF@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Jun 4, 2010 at 5:13 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>  Is there really a use case for users fiddling with pg_proc, pg_class,
>> etc. directly?
>
> There's a use case for *superusers* to fiddle with them, yes.
> (Superusers are presumed to be adults.)  I think I recommend a quick
> UPDATE on some catalog at least once a month on the lists.
>
> You might care to consider the fact that no modern Unix system prevents
> root from doing rm -rf /, even though that's "obviously" disastrous.
> Yet (stretching the analogy all out of shape) there's no convenient user
> tool for rearranging the contents of all the inodes on a filesystem.

Sure. I guess it boils down to how much use case you think there is
for updating system catalogs directly (rather than using DDL). I
don't follow all the lists so I haven't seen these recommendations.

>> At any rate, I'd be happy to drop that part of the proposal.  It would
>> be a step forward just to permit (even without
>> allow_system_table_mods) those changes which don't alter the structure
>> of the catalog.  For ALTER TABLE, the SET STATISTICS, (RE)SET
>> (attribute_option), SET STORAGE, CLUSTER ON, SET WITHOUT CLUSTER, and
>> (RE)SET (reloptions) forms are all things that fall into this
>> category, I believe.
>
> It would be far less work to just drop allow_system_table_mods to SUSET.
> And we wouldn't get questions about which forms of ALTER TABLE require
> it.

I think there's some value in distinguishing between things which are
"only for adults" and things which are "almost certainly a bad idea".

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Farid Zidan 2010-06-04 22:15:09 Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail
Previous Message Kevin Grittner 2010-06-04 21:40:05 Re: BUG #5490: Using distinct for select list causes insert of timestamp string literal to fail