Re: Stripping out slony after / before / during pg_restore?

From: "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com>
To: "Glyn Astill" <glynastill(at)yahoo(dot)co(dot)uk>
Cc: slony1-general(at)lists(dot)slony(dot)info, pgsql-general(at)postgresql(dot)org
Subject: Re: Stripping out slony after / before / during pg_restore?
Date: 2008-05-13 12:37:41
Message-ID: 65937bea0805130537h28b80c79k950d707d8dfd342d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, May 13, 2008 at 5:42 PM, Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk> wrote:

> Hi people,
>
> I'm setting us up a separate staging / test server and I want to read in a
> pg_dump of our current origin stripping out all the slony stuff.
>
> I was thinking this could serve two purposes a) test out backups restore
> properly and b) provide us with us with the staging / test server
>
> What's the best way to remove all the slony bits?
>
> I was thinking read in the dump, then use uninstall node - but I'd rather
> not have to run the slon daemons.
>
> Or should I just leave all the slony stuff in there... would it cause us
> any problems? There'd be no slons running and the next night it's all wiped
> and restored again...
>
> Anyone got any ideas? Anyone got something similar already?
>

You need to have a slon daemon running, configured to monitor the
restored database, and the essential settings for this to work are: host
name, port-number, database name and the Slony cluster name. Since you do
not have a slon daemon for the restored database, I guess you are fine after
restoring the database.

If you really need to be sure that this restored database does not take
part in replication, you can go ahead an DROP CASCADE the replication schema
from the database. For eg. if your Slony cluster name was my_repl_cluster,
then you can connect to the restored database and issue 'DROP SCHEMA
_my_repl_cluster CASCADE;' to get rid of the replication information. Now,
even if there's a slon daemon running for this DB, it won't be able to do
anything; you can eye the slon's log to see the warnings it will generate.

Best regards,

--
gurjeet[(dot)singh](at)EnterpriseDB(dot)com
singh(dot)gurjeet(at){ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB http://www.enterprisedb.com

Mail sent from my BlackLaptop device

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Fernando Schapachnik 2008-05-13 12:50:27 Re: Is this a bug? (changing sequences in default value)
Previous Message Guillaume Lelarge 2008-05-13 12:37:26 Re: pg_standby / WAL archive-restore through system restarts