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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, warrior2031(at)mail(dot)ru, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #12670: Can't create postgis extension in single-user mode
Date: 2015-01-28 15:23:25
Message-ID: 30115.1422458605@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Heikki Linnakangas <hlinnakangas(at)vmware(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2015-01-28 15:26:03 Re: BUG #12670: Can't create postgis extension in single-user mode
Previous Message patrick 2015-01-28 10:18:39 BUG #12690: EXECUTE statement fails with dynamic column name on record variable