Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YFypd-0003PC-Aa for pgsql-bugs@arkaria.postgresql.org; Tue, 27 Jan 2015 05:36:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YFypc-00066X-MY for pgsql-bugs@arkaria.postgresql.org; Tue, 27 Jan 2015 05:36:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YFypb-00066M-SB for pgsql-bugs@postgresql.org; Tue, 27 Jan 2015 05:36:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YFypY-0002Jq-Eh for pgsql-bugs@postgresql.org; Tue, 27 Jan 2015 05:36:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t0R5ag4s029162; Tue, 27 Jan 2015 00:36:42 -0500 From: Tom Lane To: warrior2031@mail.ru cc: pgsql-bugs@postgresql.org Subject: Re: BUG #12670: Can't create postgis extension in single-user mode In-reply-to: <20150126124133.19763.60605@wrigleys.postgresql.org> References: <20150126124133.19763.60605@wrigleys.postgresql.org> Comments: In-reply-to warrior2031@mail.ru message dated "Mon, 26 Jan 2015 12:41:33 +0000" Date: Tue, 27 Jan 2015 00:36:42 -0500 Message-ID: <29161.1422337002@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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