Jan Wieck JanWieck
Tue Jun 28 16:04:51 PDT 2005
On 6/28/2005 10:39 AM, Christopher Browne wrote:
> 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;

The way to go is to use the script tools/slony1_extract_schema.sh 
against the ORIGIN and pgdump -a (data-only) against a SUBSCRIBER. 
Combine that information back into an empty database and you have a 
clean database.


Jan

> 
> 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...
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/slony1-general


-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck at Yahoo.com #


More information about the Slony1-general mailing list