Re: "template1" being accessed by other users

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Michael P(dot) Soulier" <michael_soulier(at)mitel(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: "template1" being accessed by other users
Date: 2007-07-19 18:41:33
Message-ID: 21287.1184870493@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Michael P. Soulier" <michael_soulier(at)mitel(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael P. Soulier 2007-07-19 18:50:21 Re: "template1" being accessed by other users
Previous Message gonzales 2007-07-19 18:36:48 Re: "template1" being accessed by other users