Skip site navigation (1) Skip section navigation (2)

Re: error while creating database

From: Dario Brignardello <dbrignar(at)gmail(dot)com>
To: "Karthik(dot)S" <skarthik(at)midascomm(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: error while creating database
Date: 2005-12-06 18:00:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
I may be wrong, but you could try using the createdb / dropdb utils
from the pgsql/bin directory, or calling psql with some of the
parameters used by such tools (-c -d , etc).

Hope it helps.
Best regards


On 12/6/05, Karthik.S <skarthik(at)midascomm(dot)com> wrote:
> Dear all,
>         I am using postgres version: 7.1.3 in Red hat linux : 7.2.
> I am having a script(uses psql) which drops and creates a database by
> logging
> into 'template1'. This will be invoked from crontab.
> Sometimes (nearly 50% of the times) the database creation fails by saying
> "ERROR:  CREATE DATABASE: source database "template1" is being
> accessed by other users"
> But I am sure that none of my scripts access 'template1' at that time.
> I have also checked the 'ps -afx' output (logged at the time of failing),
> but no suspects found.
> Kindly give me a solution to overcome this problem.
> Also kindly tell me a way to find, which process is accessing the
> template1.
> Thanks in advance.
> regards
> KArthik.S
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

Atte: Dario Brignardello

In response to

pgsql-admin by date

Next:From: Dan The ManDate: 2005-12-06 19:50:26
Subject: 8.1.0 - PITR - cp: cannot stat
Previous:From: Bruno Wolff IIIDate: 2005-12-06 17:42:28
Subject: Re: ssl and/or md5 encryption

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group