Weird "template1" errors on CREATE DATABASE

From: Ken Williams <ken(at)mathforum(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Weird "template1" errors on CREATE DATABASE
Date: 2003-04-18 14:22:12
Message-ID: 25B46D36-71A9-11D7-90B2-003065F6D85A@mathforum.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm getting some weird errors when I run some Perl code that does a
CREATE DATABASE query. Sometimes it dies with the error 'ERROR:
CREATE DATABASE: source database "template1" is being accessed by other
users'. Other times it works fine.

The thing is, this server is running on my laptop, and no other code is
accessing the database except the code I'm running right now.
Sometimes it happens the very first time I connect to the database
(using "template1" as advised in the docs) and try to create a
database. So there couldn't *possibly* be anyone else accessing the
"template1" database.

Any way to track this down further? It's frustrating that it's an
intermittent problem, but that seems to be the reality of the situation.

I'm running postgres 7.3.2 and DBD::Pg 1.22 with DBI 1.35, all on OS X
10.2.5.

-Ken

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2003-04-18 14:31:05 Re: Using index for "like 'ABC%'" type query
Previous Message Tom Lane 2003-04-18 14:20:33 Re: explain ?