Thread: Initdb fail error - help!

Initdb fail error - help!

From
"Jonathan Lonon"
Date:
I installed the latest cygwin tools from web two weeks ago onto my laptop (WinME) and it works well.  The goal was to get the PostgreSQL included up and running.  I printed and followed the v1.9 readme file for the Cygwin PostgreSQL and all steps through step 4 work fine:
 
1. install latest cygipc
2. ipc-daemn --install-as-service (Skipped this step since not NT)
3. $ ipc-daemon &
4. export PGDATA=/usr/share/postgresql/data
5. initdb (this is where failure occurs)
 
Step five seems to be happening fine but then fails.  Here is brief snapshot:
 
$ initdb
This database system will be initialized with username "JLONON".
This user will own all the data files and must also own the server process.
 
Creating directory /usr/share/postgresql/data
(or Fixing permissions on existing directory /usr/share/postgresql/data if I create it first)
Creating directory /usr/share/postgresql/data/base
Creating directory /usr/share/postgresql/data/global
Creating directory /usr/share/postgresql/data/pg_xlog
Creating template1 database in /usr/share/postgresql/data/base/1
cat: not found
DEBUG:  database system was shut down at...
DEBUG:  CheckPoint record at (0, 8)
DEBUG:  Redo record at (0, 8); Undo record at (0, 8); Shutdown TRUE
DEBUG:  NextTransactionId: 514; NextOid: 16384
DEBUG:  database system is in production state
Creating global relations in /usr/share/postgresql/data/global
cat: not found
DEBUG:  database system was shut down at ...
DEBUG:  CheckPoint record at (0, 72)
DEBUG:  Redo record at (0, 72); Undo record at (0, 0); Shutdown TRUE
DEBUG:  NextTransactionId: 514; NextOid: 16384
DEBUG:  Database system is in production state
Initializing pg_shadow.
 
initdb failed.
Removing /usr/share/postgresql/data.
Removeing temp file /tmp/initdb.38015571.
 
I have searched the list and found a few things that seemed to be the answers such as being sure I was logged on as postgres user, which I determined is not the problem so I'm still logging in as my own username, which is what I do successfully now on my Mandrake Linux box with (I think) v7.0 of PostgreSQL.  The other thing was that I have ownership and wrx rights to the /usr/share/postgresql/data directory, and I do.
 
The purpose of trying this is to have a "portable" version of my database for this test laptop system.  Since I'm a bit new to the linux/unix commands, please give detail about what to try or do to fix this.  Thanks.
 
Any help on this would be appreciated.
 
Jonathan.

Re: Initdb fail error - help!

From
Fred Yankowski
Date:
On Thu, May 31, 2001 at 02:11:06PM -0400, Jonathan Lonon wrote:
> Creating template1 database in /usr/share/postgresql/data/base/1
> cat: not found

Do you have the 'cat' command installed and in your PATH?  I think
'cat' is provided by the textutils or fileutils Cygwin package.

--
Fred Yankowski           fred@OntoSys.com      tel: +1.630.879.1312
Principal Consultant     www.OntoSys.com       fax: +1.630.879.1370
OntoSys, Inc             38W242 Deerpath Rd, Batavia, IL 60510, USA