Subject: Re: Postgresql Data Directories
To: Patrick Welche <>
From: Curt Sampson <>
List: tech-pkg
Date: 02/19/2005 13:05:19
On Fri, 18 Feb 2005, Patrick Welche wrote:

> I haven't looked at postgresql in pkgsrc.. Does it do an initdb
> automatically? (I would have thought that wouldn't be wise, but if
> it did your suggestion would make sense...)

Yes, it does, and it's actually a good thing. It does the initdb only if
it does not find an exiting data directory. So there are three cases:

     1. You didn't have a data directory. Now you do, and everything is

     2. You had one somewhere else. So just delete the new one, move the
     old one or tweak the start script, and everything is happy.

     3. You had an old one that it found, and it didn't initdb. Now it's
     using your old one (if compatable), or postgresql refuses to start.
     I'm not sure what the user experience is in that case, since I'm
     always careful to move my old one out of the way.

The only downside of the automatic initdb is that you may not get the
default database encoding you want. But I'm also always careful to
specify an encoding when I do a createdb.

Curt Sampson  <>   +81 90 7737 2974
      Make up enjoying your city life...produced by BIC CAMERA