Re: "template1" being accessed by other users - Mailing list pgsql-general

From Tom Lane
Subject Re: "template1" being accessed by other users
Date
Msg-id 21287.1184870493@sss.pgh.pa.us
Whole thread Raw
In response to "template1" being accessed by other users  ("Michael P. Soulier" <michael_soulier@mitel.com>)
Responses Re: "template1" being accessed by other users  ("Michael P. Soulier" <michael_soulier@mitel.com>)
List pgsql-general
"Michael P. Soulier" <michael_soulier@mitel.com> writes:
> I have an issue where a post-install script tries to create a database,
> and in 1 out of 10 cases I get this:
> "createdb: database creation failed: ERROR:  source database "template1"
> is being accessed by other users"

Try inserting a short sleep before the createdb.

> Can createdb block until template1 is available?

For 8.3 we have
http://archives.postgresql.org/pgsql-committers/2007-06/msg00013.php

            regards, tom lane

pgsql-general by date:

Previous
From: "Michael P. Soulier"
Date:
Subject: "template1" being accessed by other users
Next
From: "Michael P. Soulier"
Date:
Subject: Re: "template1" being accessed by other users