Re: createdb problem - Mailing list pgsql-admin

From Tom Lane
Subject Re: createdb problem
Date
Msg-id 11050.1066153113@sss.pgh.pa.us
Whole thread Raw
In response to Re: createdb problem  (Gary Stainburn <gary.stainburn@ringways.co.uk>)
List pgsql-admin
Gary Stainburn <gary.stainburn@ringways.co.uk> writes:
> Am I right in thinking that dropdb actually connects using the template1
> database to enable it to work, and that the connection is not closing quick
> enough when dropdb finishes, thus causing the problem?

Yes.  I'd suggest issuing the DROP and CREATE commands in the same psql
session, instead of relying on dropdb's backend to terminate before
createdb's has run.  Because the backends are background processes in
the eyes of the kernel, they can easily not get scheduled when there is
anything else to do.

            regards, tom lane

pgsql-admin by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Security Problem
Next
From: Christopher Browne
Date:
Subject: Re: Lock!