Re: BUG #12670: Can't create postgis extension in single-user mode - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #12670: Can't create postgis extension in single-user mode
Date
Msg-id 30115.1422458605@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #12670: Can't create postgis extension in single-user mode  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: BUG #12670: Can't create postgis extension in single-user mode  (Bruce Momjian <bruce@momjian.us>)
List pgsql-bugs
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> On 01/28/2015 03:49 AM, Tom Lane wrote:
>> Now, I'll agree that if you just intend to install a couple of simple
>> extensions, you might be able to get away with doing that much without
>> any background support processes.  But it's not a mode meant for
>> routine activity.  And I rather wonder why you need to install
>> extensions in that way anyway.

> Using the single-user mode for installing extensions etc. is a sensible
> idea; or was if it worked. It'd be nice to run initdb, install
> extensions, even load data etc. all in single-user mode,

... and right there is where the argument falls to the ground.  Loading
any significant amount of data without background checkpointing, bgwriter,
wal writer, etc will be exceedingly slow, *and* have the risk of having
to replay a whole lot of WAL if you have any problems.  It's not apparent
to me how this is superior to loading all the same definitions and data
after the system is up for real.

> We had discussions some time ago about teaching the backend to speak the
> regular FE/BE protocol in single-user mode, and having libpq "connect"
> to that. That would still be nice...

Yeah, I was one of the ones pushing it.  But the idea stalled after it
was pointed out how unpleasant an operating environment it would be.

At this point I think a more practical solution to the lock-out-users-
for-maintenance problem would be to invent some postmaster command line
switch for overriding pg_hba.conf.  Not sure exactly what it would look
like.

            regards, tom lane

pgsql-bugs by date:

Previous
From: David Gould
Date:
Subject: Re: Infinite loop in GetMultiXactIdMembers() on 9.3.5 (involves pg_upgrade)
Next
From: Andres Freund
Date:
Subject: Re: BUG #12670: Can't create postgis extension in single-user mode