Weird "template1" errors on CREATE DATABASE - Mailing list pgsql-general

From Ken Williams
Subject Weird "template1" errors on CREATE DATABASE
Date
Msg-id 25B46D36-71A9-11D7-90B2-003065F6D85A@mathforum.org
Whole thread Raw
Responses Re: Weird "template1" errors on CREATE DATABASE  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: explain ?
Next
From: Andrew Sullivan
Date:
Subject: Re: Using index for "like 'ABC%'" type query