Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 0E796633765 for ; Fri, 4 Jun 2010 17:53:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 97794-03 for ; Fri, 4 Jun 2010 20:53:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id A4362633663 for ; Fri, 4 Jun 2010 17:53:38 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o54KraEL023388; Fri, 4 Jun 2010 16:53:36 -0400 (EDT) To: Robert Haas cc: Gurjeet Singh , PGSQL Bugs Subject: Re: superuser unable to modify settings of a system table In-reply-to: References: <6649.1275584543@sss.pgh.pa.us> <7060.1275585689@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Fri, 04 Jun 2010 16:41:08 -0400" Date: Fri, 04 Jun 2010 16:53:36 -0400 Message-ID: <23387.1275684816@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.51 tagged_above=-5 required=5 tests=BAYES_05=-0.5, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/66 X-Sequence-Number: 27027 Robert Haas 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