Home > Archive > Slony1 PostgreSQL Replication > January 2006 > slony and rules









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author slony and rules
Hubert Fröhlich

2006-01-17, 3:24 am

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...update.php?1363) ?



-- =

Mit freundlichen Gr=FC=DFen / With kind regards

Hubert Fr=F6hlich

---------------------------------------------------------------------------=
----
Dr.-Ing. Hubert Fr=F6hlich
Landesamt f=FCr Vermessung und Geoinformation
Alexandrastr. 4, D-80538 M=FCnchen, GERMANY
Tel. :+49 (0)89 / 2129 - 2980
Fax :+49 (0)89 / 2129 - 2997
hubert dot froehlich at lvg dot bayern dot de
Andrew Sullivan

2006-01-17, 9:24 am

On Tue, Jan 17, 2006 at 08:10:49AM +0100, Hubert Fr=F6hlich wrote:
> =


> 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 =



Yes. That's how the disabling is achieved (so when you switch over,
for instance, it can be re-enabled). It's a bit of a dirty hack. We
know.

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


You didn't read the documentation. You can't dump the slave DB using
pg_dump.

A

-- =

Andrew Sullivan | ajs-oaT0K0jot5/q2IAV+ODieA@public.gmane.org
"The year's penultimate month" is not in truth a good way of saying
November.
--H.W. Fowler
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com