I guess I won't get any anwers for this. And after many searches, it seems not possible.
Maybe some can help me. I am in a situation where someone designed something, and now I was put in charge of making sure it is working.
1) we have a database inside our firewall.
2) Updates are done inside the firewall during the day
3) At night, there is a job dumping the database and ftping the dump on an external server
4) On the external server, I have a job droping the database, creating the database and restoring the database that was ftped.
There are so many places where this could fail: 1) while dumping, 2) while ftping, 3) cronjob synchronization on 2 different machines, 4) user connected to database so drop/create database don't work, etc
What we want is to replicate the inside the firewall database to outside the firewall database.
Or we could simplify this: we want to replicate a database into a different machine.
Any help?
Eric
-----Original Message-----
From: Eric Audet [mailto:eaudet@scc.ca]
Sent: March 13, 2003 2:20 PM
To: pgsql-general
Subject: [GENERAL] Droping a database even if someone is connected
Is there a way to drop a database even if someone is connected to it?
I use a perl script that
1) drop the database, (dropdb)
2) create a new database, (createdb)
3) restore a database from a dump (psql databasename <dumpfile)
When the drop does not work, everything else fails!
Thanks in advance
Eric