Thread: Trouble in using initdb

Trouble in using initdb

From
gopa pragna
Date:
Hi,
I am trying to use postgresql through cygwin in windows.I installes cygwin with all the required components.When I am trying to use intidb command it failed.
 
I have pasted the error messages.
 
Please do reply and let me know if there is a better way to use postgresql(i am a beginner).
 
Following is the message i got in the cygwin bash shell:
 
$ initdb -D/usr/local/pgsql/data -W -E LATIN1
The files belonging to this database system will be owned by user "Pragna Gopa".
This user must also own the server process.
The database cluster will be initialized with locale C.
creating directory /usr/local/pgsql/data... ok
creating directory /usr/local/pgsql/data/base... ok
creating directory /usr/local/pgsql/data/global... ok
creating directory /usr/local/pgsql/data/pg_xlog... ok
creating dir ectory /usr/local/pgsql/data/pg_clog... ok
selecting default max_connections... /usr/bin/initdb: line 564:  3436 Bad system call
      "$PGPATH"/postgres -boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 564:  2568 Bad system call         "$PGPATH"/postgres -boot -x0 $T
EST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 564:  1860 Bad system call         "$PGPATH"/postgres -boot -x0 $T
EST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 564:   224 Bad system call         "$PGPATH"/postgres -boot -x0 $T
EST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 564:  3656 Bad system call         "$PGPATH"/postgres -boot -x0 $T
EST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 564:  3152 Bad system call         "$PGPATH"/postgres -boot -x0 $T
EST_OPT template1 </dev/null >/dev/null 2>&1
10
selecting default shared_buffers... /usr/bin/initdb: line 578:  2092 Bad system call
     "$PGPATH"/postgres -boot -x0 $TEST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 578:  3700 Bad system call         "$PGPATH"/postgres -boot -x0 $T
EST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 578:  2220 Bad system call         "$PGPATH"/postgres -boot -x0 $T
EST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 578:  3696 Bad system call         "$PGPATH"/ postgres -boot -x0 $T
EST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 578:  3716 Bad system call         "$PGPATH"/postgres -boot -x0 $T
EST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 578:  3872 Bad system call         "$PGPATH"/postgres -boot -x0 $T
EST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 578:  3912 Bad system call         "$PGPATH"/postgres -boot -x0 $T
EST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 578:  3940 Bad system call         "$PGPATH"/postgres -boot -x0 $T
EST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 578:  3944 Bad system call         "$PGPATH"/postgres -boot -x0 $T
EST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 578:  4000 Bad system call         "$PGPATH"/postgres -boot -x0 $T
EST_OPT template1 </dev/null >/dev/null 2>&1
/usr/bin/initdb: line 578:  3884 Bad system call         "$PGPATH"/postgres -boot -x0 $T
EST_OPT template1 </dev/null >/dev/null 2>&1
50
creating configuration files... ok
creating template1 database in /usr/local/pgsql/data/base/1... /usr/bin/initdb: line 644
:  3772 Bad system call         "$PGPATH"/postgres -boot -x1 $PGSQL_OPT $BOOTSTRAP_TALK_
ARG template1
initdb: failed
initdb: removing data directory "/usr/local/pgsql/data"
Pragna Gopa@Pragna ~
$
 
 
 
 
 
 
Thank you,
Pragna.

Send instant messages to your online friends http://in.messenger.yahoo.com

Re: Trouble in using initdb

From
"pobox@verysmall.org"
Date:
Hello,

it seems that you are missing cygserver.

I am just doing some testing of 8.0.4 vs 8.1.2 under cygwin and I get
the same when I forget cygserver.

After you install cygwin, do the following -

export CYGWIN=server (not clear if needed, try without it)
unset LANG (not clear if needed, try without it)
export PATH=/usr/bin:/usr/sbin:/usr/local/pgsql/bin:$PATH
/usr/bin/cygserver-config
cygserver &

Then you do -

./configure
make
make install

in the source directory.

Then -

export CYGWIN=server (makes initdb use the cygserver)
initdb -D /usr/local/pgsql/data

This should work.

Iv


Re: Trouble in using initdb

From
"pobox@verysmall.org"
Date:
Hello,

it seems that you are missing cygserver.

I am just doing some testing of 8.0.4 vs 8.1.2 under cygwin and I get
the same when I forget cygserver.

After you install cygwin, do the following -

export CYGWIN=server (not clear if needed, try without it)
unset LANG (not clear if needed, try without it)
export PATH=/usr/bin:/usr/sbin:/usr/local/pgsql/bin:$PATH
/usr/bin/cygserver-config
cygserver &

Then you do -

./configure
make
make install

in the source directory.

Then -

export CYGWIN=server (makes initdb use the cygserver)
initdb -D /usr/local/pgsql/data

This should work.

Iv