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

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to