Christopher Browne cbbrowne
Tue Jun 28 15:39:46 PDT 2005
Thomas Pundt wrote:

>On Tuesday 28 June 2005 14:28, cbbrowne at ca.afilias.info wrote:
>| In view of your having created a dumped copy in the database
>| 'dumped_copy', well, you could define a little slonik script...
>|
>| cluster name=foo;
>| node 1 admin conninfo='dbname=dumped_copy';
>| uninstall node (id=1);
>|
>| That should clean out the Slony-I-specific objects for cluster 'foo'; the
>| results for those fudged-with-triggers may be a tad incomplete...
>
>it might useful to empty the tables _foo.sl_table and _foo.sl_sequence
>beforehand - but I don't have the details at hand right now...
>  
>
The OTHER alternative is to do...

 drop schema _foo cascade;

That will drop out the Slony-I schema, and hence drop out the stored
functions, and, via CASCADE, drop out the triggers that use those stored
functions.

"drop schema" doesn't do several things that you might want:

 1.  If there are tables with a 'fabricated' Slony-I primary key on a
column created for that purpose, that column won't be dropped

 2. "drop schema" won't do anything about recovering triggers to their
former states (although if the DB was a pg_dump | psql copy, the "lost
triggers" may be well and truly lost...)

I don't see there anything terribly useful about fiddling with
sl_table/sl_sequence in the process...


More information about the Slony1-general mailing list