Re: remove dbname arg from bootstrap mode

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: remove dbname arg from bootstrap mode
Date: 2007-02-16 01:11:08
Message-ID: 20070216011108.GB4682@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > This little patch removes the dbname argument to InitPostgres in the
> > bootstrap mode. It also cleans a bit of fallout: initdb uselessly
> > passing an unused database name, postmaster starting a dummy process,
> > and removes the -y option to the bootstrap process, which is
> > undocumented and useless.
>
> (a) Doesn't postgres-ref.sgml need to be updated for this?

Ah, that's where this was documented! Sure.

> (b) What dummy process?

Startup and bgwriter (neither of which connect to a database)

> (c) Can't you remove the output-dbname argument you added to InitPostgres?

Hmm, I don't see how -- the autovacuum worker needs it. And the return
value of InitPostgres is already taken by the is_superuser flag.

One simplification I tried in that area was making a separate
InitBootPostgres to cater for bootstrap, but the common code is too much
and too interleaved to be useful.

(I'm not sure if this last comment is related to this particular patch
or a gripe about the InitPostgres change in the autovac patch?)

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-02-16 01:13:08 Re: remove dbname arg from bootstrap mode
Previous Message David Fetter 2007-02-16 00:59:15 Re: patch adding new regexp functions