From: | Eric Audet <eaudet(at)scc(dot)ca> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | No aswer WAS: Droping a database even if someone is con nected |
Date: | 2003-03-14 14:16:42 |
Message-ID: | 1FE49909B982214BBF40AE6C363430BD039467@mail03.scc.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(at)scc(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Fernando Papa | 2003-03-14 14:20:51 | Catching errors in pl/pgsql |
Previous Message | Erwin Moller | 2003-03-14 12:52:10 | newbie question: 'multithreading' longrunning postgres-queries from plpgsql-function. |