From: Tom Lane <tgl@sss.pgh.pa.us>
To: warrior2031@mail.ru
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #12670: Can't create postgis extension in single-user mode
Date: Tue, 27 Jan 2015 00:36:42 -0500
Message-ID: <29161.1422337002@sss.pgh.pa.us> (raw)
In-Reply-To: <20150126124133.19763.60605@wrigleys.postgresql.org>
References: <20150126124133.19763.60605@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
warrior2031@mail.ru writes:
> [ Can't create postgis extension in single-user mode ]
Why in the world would you think that's a good thing to do?
Single-user mode is a barely-documented disaster recovery aid.
It's not meant for routine activity. There are a *whole lot*
of behaviors you want that are turned off in single-user mode.
The specific reason why this doesn't work is this bit in
heap_create_with_catalog:
/*
* Decide whether to create an array type over the relation's rowtype. We
* do not create any array types for system catalogs (ie, those made
* during initdb). We do not create them where the use of a relation as
* such is an implementation detail: toast tables, sequences and indexes.
*/
if (IsUnderPostmaster && (relkind == RELKIND_RELATION ||
relkind == RELKIND_VIEW ||
relkind == RELKIND_MATVIEW ||
relkind == RELKIND_FOREIGN_TABLE ||
relkind == RELKIND_COMPOSITE_TYPE))
new_array_oid = AssignTypeArrayOid();
We could possibly develop some other mechanism for detecting whether
we're within the initdb sequence, but I can't get very excited about
treating this as a bug. Single-user mode hasn't been considered a
standard user environment since maybe the early 90s.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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, warrior2031@mail.ru
Subject: Re: BUG #12670: Can't create postgis extension in single-user mode
In-Reply-To: <29161.1422337002@sss.pgh.pa.us>
References: <20150126124133.19763.60605@wrigleys.postgresql.org> <29161.1422337002@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