Re: error in creating database - Mailing list pgsql-general

From A. Kretschmer
Subject Re: error in creating database
Date
Msg-id 20051206152128.GJ24844@webserv.wug-glas.de
Whole thread Raw
In response to error in creating database  ("Karthik.S" <skarthik@midascomm.com>)
List pgsql-general
am  06.12.2005, um 17:56:20 +0530 mailte Karthik.S folgendes:
> Dear all,
>
>         I am using postgres version: 7.1.3 in Red hat linux : 7.2.

Uuhhh, 7.1 is out of lifetime. You should update!



>
> I am having a script (uses psql) which drops and creates a database by
> logging
> into 'template1'. This will be invoked from crontab.

Why drop and create the database?


>
> 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.

Can you split the script into 2 parts (drop and create) an run
separately this scripts?

But, i think:
- drop/create the same database via cron is silly
- you should update to 8.1, in versions prior 7.4 there was any bugs.



HTH, Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47212,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===

pgsql-general by date:

Previous
From: "Karthik.S"
Date:
Subject: error in creating database
Next
From: "Markus Wollny"
Date:
Subject: Re: error in creating database