Re: initdb change

From: Joshua Drake <jd(at)commandprompt(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: initdb change
Date: 2008-08-25 15:51:26
Message-ID: 20080825085126.5f509c22@jd-laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 25 Aug 2008 08:40:17 -0700
David Fetter <david(at)fetter(dot)org> wrote:

> Folks,
>
> While initdb allows you to choose a directory for transaction logs, it
> can't already exist, so it can't be in its usual place under $PGDATA.
> I'd like to propose that this be allowed by having an alternate syntax
> for the -X option, namely, "existing."
>
> When -X is set to "existing", it would check whether pg_xlog is a
> directory and the only thing in $PGDATA. One way to do that is to add
> a new return code to check_data_dir() and a new branch of the case
> statement after it's called.
>

Why not just implicitly do it? If the directory already exists we throw
a notice saying:

NOTICE: pg_xlog destination already exists, creating pg_xlog underneath
(or some such thing)

> What say?
>
> Cheers,
> David.

--
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2008-08-25 16:04:01 Re: initdb change
Previous Message Tom Lane 2008-08-25 15:48:29 Re: initdb change