Re: erroneous restore into pg_catalog schema
Andres Freund <andres@2ndquadrant.com>
From: Andres Freund <andres@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, 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-13T18:43:55Z
Lists: pgsql-hackers
On 2013-05-13 14:35:47 -0400, Tom Lane wrote: > Andres Freund <andres@2ndquadrant.com> writes: > > I think we shouldn't check IsPostmasterEnvironment here but instead > > IsBootstrapProcessingMode() since we otherwise can generate oids below > > FirstNormalObjectId in --single mode. > > That is, in fact, exactly what we want to do and must do during initdb. > If you change anything about this code you'll break the way the > post-bootstrap initdb steps assign OIDs. Well, then we should use some other way to discern from those both cases. If you currently execute CREATE TABLE or something else in --single user mode the database cannot safely be pg_upgraded anymore since the oids might already be used in a freshly initdb'ed cluster in the new version. Or am I missing something here? DROPing and recreating a new index in --single mode isn't that uncommon... Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
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