On Mon, 2 Feb 2004, Hamedany, Allen wrote:
> Running postgresql v7.3 on RH7.3 linux; db creation fails and is
> reproducible after a fresh image install. Any subsequent rebooting seems
> to work fine.
> We start up Postgres, create users and db using a Java (IBM1.4.1) class.
> The following commands are executed in the following order:
> /usr/local/pgsql/bin/pg_ctl -w start -D /var/lib/pgsql -l
> /var/log/pgsqld.log -o -i
> /usr/local/pgsql/bin/createdb management <-- fails here
> /usr/local/pgsql/bin/createdb test <-- fails here
> 2004-02-02 17:33:01  LOG: query: SET autocommit TO 'on';CREATE
> DATABASE "test"
> 2004-02-02 17:33:01  ERROR: CREATE DATABASE: source database
> "template1" is being accessed by other users
This is showing that the second createdb call is failing with the error
that there is an open connection to template1. In your case I wonder if
even though the "createdb management" client has exited allowing the code
to proceed to "createdb test" call, the backend associated with this
connection may not have completely shut down yet.
What happens if you add a sleep 5 call in between the createdb calls?
In response to
pgsql-bugs by date
|Next:||From: Tom Lane||Date: 2004-02-03 15:16:26|
|Subject: Re: createdb fails |
|Previous:||From: Kris Jurka||Date: 2004-02-03 08:12:43|
|Subject: Re: createdb fails|