Re: [Slony1-general] Re: Stripping out slony after / before / during pg_restore?

From: "Stuart Bishop" <stuart(at)stuartbishop(dot)net>
To: slony1-general(at)lists(dot)slony(dot)info, pgsql-general(at)postgresql(dot)org
Subject: Re: [Slony1-general] Re: Stripping out slony after / before / during pg_restore?
Date: 2008-10-13 10:43:36
Message-ID: 6bc73d4c0810130343t2f72d59bp417926379800c48e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Oct 13, 2008 at 5:05 PM, Stuart Bishop <stuart(at)stuartbishop(dot)net> wrote:

> So what was the final recommended process for building a stand alone
> database from a pg_dump of a replicated node?

> So if I'm reading this thread correctly, the alternative is 'DROP _sl
> CASCADE;', which doesn't do a full cleanup. Is there no supported
> disaster recovery procedure?

So to (hopefully) answer my own question, the following seems to Do
The Right Thing™:

pg_dump --oids --format=c --file=master.dump master_db
createdb staging_db
pg_restore -d staging_db master.dump
slonik << EOM
cluster name = sl;
node 1 admin conninfo = 'dbname=staging_db user=slony';
repair config (set id = 1, event node = 1, execute only on = 1);
repair config (set id = 2, event node = 1, execute only on = 1);
uninstall node (id = 1);
EOM

Can anyone who actually knows what they are doing confirm or ridicule
this recipe?

--
Stuart Bishop <stuart(at)stuartbishop(dot)net>
http://www.stuartbishop.net/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2008-10-13 10:44:54 Re: Out of memory in create index
Previous Message Greg Smith 2008-10-13 10:43:09 Re: Opteron vs. Xeon performance differences