pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedinitdb - (InitPostgres) - FATAL: database "postgres" does not exist
2+ messages / 2 participants
[nested] [flat]
* initdb - (InitPostgres) - FATAL: database "postgres" does not exist
@ 2004-09-01 13:27 Seamus Ryan <ryan@post.queensu.ca>
0 siblings, 1 reply; 2+ messages in thread
From: Seamus Ryan @ 2004-09-01 13:27 UTC (permalink / raw)
To: pgsql-admin
hi,
I am having trying to install Postgres 7.4.5, I have gmake 3.76.1 installed.
I have completed following steps:
./configure --prefix=/opt/local --enable-multibyte --enable-unicode
--with-java --without-readline
make
su rootr
make install
adduser postgres
mkdir /opt/local/pgsql
mkdir /opt/local/pgsql/data
chown postgres /opt/local/pgsql
chown postgres /opt/local/pgsql/data
su - postgres
/opt/local/bin/initdb -D /opt/local/pgsql/data
Note in the initdb script I altered the call to postgres to turn on debug:
==========================================================================
/opt/local/bin/postgres -d 5 -F -D/opt/local/pgsql/data -O -c
search_path=pg_catalog -c exit_on_error=true
Here is output from initdb with above change:
=========================================================================
$ ./initdb -D /opt/local/pgsql/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale C.
creating directory /opt/local/pgsql/data... ok
creating directory /opt/local/pgsql/data/base... ok
creating directory /opt/local/pgsql/data/global... ok
creating directory /opt/local/pgsql/data/pg_xlog... ok
creating directory /opt/local/pgsql/data/pg_clog... ok
selecting default max_connections... 100
selecting default shared_buffers... 1000
creating configuration files... ok
creating template1 database in /opt/local/pgsql/data/base/1... ok
initializing pg_shadow... ok
enabling unlimited row size for system tables... ok
initializing pg_depend... ok
creating system views... ok
loading pg_description... ok
creating conversions... ok
setting privileges on built-in objects... ok
creating information schema... ok
vacuuming database template1...
DEBUG: found "/opt/local/bin/postgres" using argv[0]
DEBUG: invoking IpcMemoryCreate(size=10461184)
LOG: database system was shut down at 2004-09-01 08:12:34 EDT
LOG: checkpoint record is at 0/6253E8
LOG: redo record is at 0/6253E8; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 462; next OID: 17141
LOG: database system is ready
DEBUG: InitPostgres
FATAL: database "postgres" does not exist <=== FAILURE POINT!!!
DEBUG: proc_exit(1)
DEBUG: shmem_exit(1)
LOG: shutting down
LOG: database system is shut down
DEBUG: exit(1)
==========================================================================
Any hints on why InitPostgres is not finding database "postgres"?
thanks,
Seamus
Solaris 9
=========
$ env
HOME=/export/home/postgres
HZ=
LOGNAME=postgres
PATH=/usr/bin:
SHELL=/bin/sh
TERM=xterm
TZ=Canada/Easter
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: initdb - (InitPostgres) - FATAL: database "postgres" does not exist
@ 2004-09-01 23:00 Tom Lane <tgl@sss.pgh.pa.us>
parent: Seamus Ryan <ryan@post.queensu.ca>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2004-09-01 23:00 UTC (permalink / raw)
To: Seamus Ryan <ryan@post.queensu.ca>; +Cc: pgsql-admin
Seamus Ryan <ryan@post.queensu.ca> writes:
> Note in the initdb script I altered the call to postgres to turn on debug:
Hmmm ....
> Any hints on why InitPostgres is not finding database "postgres"?
Because there isn't one --- at that point in the process, only database
template1 will exist.
The postgres invocation at that step of initdb looks just about the
same as the previous ones:
"$PGPATH"/postgres $PGSQL_OPT template1 >/dev/null <<EOF
and it should certainly go to template1 rather than defaulting to $USER.
I suspect that you messed this command up somehow while hand-modifying
the script.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-09-01 23:00 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-09-01 13:27 initdb - (InitPostgres) - FATAL: database "postgres" does not exist Seamus Ryan <ryan@post.queensu.ca>
2004-09-01 23:00 ` Re: initdb - (InitPostgres) - FATAL: database "postgres" does not exist Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox