Received: from stan.ringways.co.uk ([213.38.87.130]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f62FI5a29347 for ; Mon, 2 Jul 2001 11:18:09 -0400 (EDT) (envelope-from gary.stainburn@ringways.co.uk) Received: from gary.ringways.co.uk ([10.1.1.2]) by stan.ringways.co.uk with smtp (Exim 3.13 #1) id 15H5Mv-0005Xd-00 for pgsql-admin@postgresql.org; Mon, 02 Jul 2001 16:12:09 +0100 Content-Type: text/plain; charset="iso-8859-1" From: Gary Stainburn Organization: Ringways Garages Ltd To: "pgsql-admin" Subject: Cannot drop database that is in use (NOT) Date: Mon, 2 Jul 2001 16:04:46 +0100 X-Mailer: KMail [version 1.2] MIME-Version: 1.0 Message-Id: <01070216044601.02332@gary.ringways.co.uk> Content-Transfer-Encoding: 8bit X-Archive-Number: 200107/5 X-Sequence-Number: 1756 Hi all, I'm developing a database and have a small shell script that drops the database, creates it, and then feeds psql to create the tables etc. I've tried to run it and get the following error: [revcom@curly revcom]$ recreate ERROR: DROP DATABASE: Database "revcom" is being accessed by other users dropdb: database removal failed ERROR: CREATE DATABASE: database "revcom" already exists createdb: database creation failed ERROR: Relation 'teams_tid_seq' already exists ERROR: Relation 'members_mid_seq' already exists blah blah.... I know that there is nobody using the database, so I can only assume it is some left-over garbage from my first every php script (as I don't know how to close the link openned by pg_pconnect). How do I close any pending connections and reset the usage count so that I can drop the database? -- 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