Re: erroneous restore into pg_catalog schema
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Heikki Linnakangas <hlinnakangas@vmware.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, Erik Rijkers <er@xs4all.nl>, Dimitri Fontaine <dimitri@2ndquadrant.fr>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Kohei KaiGai <kaigai@kaigai.gr.jp>
Date: 2013-05-13T16:20:54Z
Lists: pgsql-hackers
On Mon, May 13, 2013 at 11:48 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Heikki Linnakangas <hlinnakangas@vmware.com> writes: >> On 09.05.2013 18:24, Robert Haas wrote: >>> In the attached new version of the patch, I added an explicit check to >>> prevent relocatable extensions from being created in pg_catalog. > >> Do we really want to forbid that? > > The only alternative I see is the one proposed in > http://www.postgresql.org/message-id/12365.1358098148@sss.pgh.pa.us: Let me propose another alternative: it would be relatively straightforward to allow this to work differently in extension scripts than it does in general; it's already contingent in whether we're in bootstrap-processing mode, and there's no reason we couldn't add some other flag that gets set during extension-script processing mode, if there isn't one already, and make it contingent on that also. I think what we're concerned with is mostly preventing accidental object creation in pg_catalog, and allowing extensions to be created there wouldn't interfere with that. > I believe the DROP prohibition is mainly there to prevent > drop table pg_catalog.pg_proc; > ERROR: permission denied: "pg_proc" is a system catalog > but that thinking predates the invention of pg_depend. If this > check were removed, you'd still be prevented from dropping pg_proc > because it's pinned. Well, +1 for relaxing that restriction, no matter what else we do. But that only makes an accidental restore into pg_catalog less sucky, not less likely. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Extend and improve use of EXTRA_REGRESS_OPTS.
- 4ae5ee6c9b4d 9.3.0 cited
-
Remove misplaced sanity check from heap_create().
- a475c6036752 9.3.0 cited
-
Silently ignore any nonexistent schemas that are listed in search_path.
- 880bfc3287dd 9.2.0 cited