createdb problem

From: Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: createdb problem
Date: 2003-10-14 15:32:52
Message-ID: 200310141632.52589.gary.stainburn@ringways.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi folks,

I've got two totally seperate databases that I'm working on at the moment, the
only thing they have in common is the server that they're on (RH7.3+Errata)

For each of these databases I have a file containing the SQL commands to
create and populate the various tables, and bash script which simply calls

dropdb $dbname
createdb $dbname
psql <$dbname.sql

However, for the last few days, this script seems to be alternating between
working and not working, the sequence being:

[gary(at)eddie gary]$ dbreset
ERROR: DROP DATABASE: database "service" does not exist
dropdb: database removal failed
CREATE DATABASE
0 errors
[gary(at)eddie gary]$ dbreset
DROP DATABASE
ERROR: CREATE DATABASE: source database "template1" is being accessed by
other users
createdb: database creation failed
0 errors
[gary(at)eddie gary]$ dbreset
ERROR: DROP DATABASE: database "service" does not exist
dropdb: database removal failed
CREATE DATABASE
0 errors
[gary(at)eddie gary]$

Can anyone tell me why the createdb seems to fail if the preceeding dropdb
worked.
--
Gary Stainburn

This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Gary Stainburn 2003-10-14 16:11:11 Re: createdb problem
Previous Message Tom Lane 2003-10-14 15:32:26 Re: pg_dumps