Re: remove dbname arg from bootstrap mode - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: remove dbname arg from bootstrap mode
Date
Msg-id 20070216011108.GB4682@alvh.no-ip.org
Whole thread Raw
In response to Re: remove dbname arg from bootstrap mode  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: remove dbname arg from bootstrap mode
List pgsql-patches
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.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.

pgsql-patches by date:

Previous
From: David Fetter
Date:
Subject: Re: patch adding new regexp functions
Next
From: Tom Lane
Date:
Subject: Re: remove dbname arg from bootstrap mode