Re: initdb and "exit_nicely"... - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: initdb and "exit_nicely"...
Date
Msg-id Pine.LNX.4.21.0005251252570.348-100000@localhost.localdomain
Whole thread Raw
In response to Re: initdb and "exit_nicely"...  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: initdb and "exit_nicely"...
List pgsql-general
Tom Lane writes:

> The idea I suggested a couple of days ago was that initdb should refuse
> to run if PGDATA exists and is nonempty.  Sound reasonable?

Okay, let's do that. How do you find out if a directory is empty? The best
way I could think of is this:

test x"`ls -A "$PGDATA"`" = x

Are we talking 7.0.1 material, btw?

--
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden


pgsql-general by date:

Previous
From: Marcin Inkielman
Date:
Subject: PG 7.0 vacuum problem
Next
From: Tom Lane
Date:
Subject: Re: PG 7.0 vacuum problem