Skip site navigation (1) Skip section navigation (2)

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

From: Christopher Browne <cbbrowne(at)ca(dot)afilias(dot)info>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk>, 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-09-25 17:05:24
Message-ID: 87abdwp357.fsf@dba2.int.libertyrms.com (view raw or flat)
Thread:
Lists: pgsql-general
Richard Huxton <dev(at)archonet(dot)com> writes:
> Glyn Astill 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?
>
> Well, you can always just drop the slony schema (with a cascade) -
> that should do it.

Not quite.  There are two things that *doesn't* hit:

 a) If there were any tables where a Slony-I key column got added,
    DROP SCHEMA CASCADE doesn't trim that column out, which can
    cause some minor heartburn.  If you don't use TABLE ADD KEY,
    then this isn't an issue.

 b) In versions of Slony-I before 2.0, stripping out the schema on a
    subscriber will leave triggers in a hidden state.

You want to look into UNINSTALL NODE, which does the full cleanup.
-- 
(format nil "~S(at)~S" "cbbrowne" "linuxfinances.info")
http://linuxfinances.info/info/languages.html
REALITY is a crutch for people who can't face ITS.

In response to

Responses

pgsql-general by date

Next:From: Reg Me PleaseDate: 2008-09-25 17:30:27
Subject: Dynamically created cursors vanish in PLPgSQL
Previous:From: Marcus EngeneDate: 2008-09-25 16:59:37
Subject: Re: regexp_replace() [noindex] thing

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group