Hubert Fröhlich hubert.froehlich
Mon Jan 16 23:10:49 PST 2006
Hi list,

I use slony (1.1.2 on PostgreSQL 8.0.3) for a database with triggers and 
rules.

i proceeded like this:
  a) I set up the slave database (just the empty schema) with the
triggers and rules
  b) I defined the nodes and sets etc. ; everything ok
  c) I started the slon process (subscribe ...) .

Concerning the rule, I ran into an error (not always) .

In the following, I try to describe what happens to the slave DB.
When starting the daemon, we would expect the triggers and rules in the
slave db to be deactivated: The triggers will be removed from 
pg_trigger, and concerning triggers, everything is OK.

The rules should be removed from pg_rules (and, pg_rewrite?) but then 
something goes wrong:

Although the rule is not shown when checking

\d table
(the rule does not appear) and everything seems correct,

the rule is not removed in pg_rewrite but instead appears in pg_rewrite 
with a changed oid in the column ev_class. This oid does not point to 
the original table (in pg_class) as before, but to a primary key. I 
guess that something strange has happened to the id. So the rule seems 
not to be deleted in pg_rewrite. Instead, the rule
refers to a wrong OID.

The result is that I run into an error when trying to dump the slave DB:

pg_dump: failed sanity check, parent table OID ... of pg_rewrite entry
OID ... not found

Replication continues properly, but dumping is not possible any longer.

When dropping the rule in the slave db before setting up sets etc.,
everything runs fine.

a) Can anybody help me? Are my assumptions correct?
b) Can this be fixed?
c) It seems that there is a similar problem in the feature request of
http://gborg.postgresql.org/project/slony1/bugs/bugupdate.php?1363) ?



-- 
Mit freundlichen Gr??en / With kind regards

Hubert Fr?hlich

-------------------------------------------------------------------------------
Dr.-Ing. Hubert Fr?hlich
Landesamt f?r Vermessung und Geoinformation
Alexandrastr. 4, D-80538 M?nchen, GERMANY
Tel. :+49 (0)89 / 2129 - 2980
Fax  :+49 (0)89 / 2129 - 2997
hubert dot froehlich at lvg dot bayern dot de



More information about the Slony1-general mailing list