X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id E754ED1B53D for ; Tue, 14 Oct 2003 17:39:05 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 52305-08 for ; Tue, 14 Oct 2003 14:38:35 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 88459D1B50E for ; Tue, 14 Oct 2003 14:38:33 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h9EHcXhn011051; Tue, 14 Oct 2003 13:38:34 -0400 (EDT) To: Gary Stainburn Cc: pgsql-admin@postgresql.org Subject: Re: createdb problem In-reply-to: <200310141711.11203.gary.stainburn@ringways.co.uk> References: <200310141632.52589.gary.stainburn@ringways.co.uk> <200310141711.11203.gary.stainburn@ringways.co.uk> Comments: In-reply-to Gary Stainburn message dated "Tue, 14 Oct 2003 17:11:11 +0100" Date: Tue, 14 Oct 2003 13:38:33 -0400 Message-ID: <11050.1066153113@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/142 X-Sequence-Number: 10703 Gary Stainburn 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