Bug 253 - In the event of OID mismatch, slon confirms replication events without actually actioning them
Summary: In the event of OID mismatch, slon confirms replication events without actual...
Status: RESOLVED DUPLICATE of bug 156
Alias: None
Product: Slony-I
Classification: Unclassified
Component: slon (show other bugs)
Version: 2.0
Hardware: PC Linux
: low normal
Assignee: Slony Bugs List
URL:
Depends on:
Blocks:
 
Reported: 2011-11-28 04:40 UTC by Mark Summers
Modified: 2011-11-30 13:14 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Summers 2011-11-28 04:40:20 UTC
1) Create any Slony cluster e.g. 1 x master, 1 x slave, 1 x set

2) On the slave, stop slon

3) On the slave, perform an operation that invalidates an OID stored in sl_table or sl_sequence e.g. DROP TABLE <table> and CREATE TABLE <table>

4) On the slave, start slon

The Slony log will show that the slave's slon is receiving replication and events and also confirming them.  The problem is that none of the changes are actually being applied on the slave due to the mismatched OID.

5) Fix the OID in sl_path or sl_sequence after obtaining the correct OID from pg_class (presumably this could also be done via slonik_repair_config)

6) Restart slon on the slave

Now, new events are confirmed AND actioned but the events that were previously confirmed are lost forever.

Effectively, replication events are skipped over and cannot be replayed.  The only option is to resync the slave.

Suggestion: slon should not confirm replication events involving a relation with mismatched OID but instead log an error.

This would create the opportunity for a manual repair of the mismatched OID, after which all lagging events would be actioned and slave sync could be restored with minimal effort.
Comment 1 Steve Singer 2011-11-29 10:56:42 UTC
What version of slony are you running?

This sounds a lot like bug 156 
http://bugs.slony.info/bugzilla/show_bug.cgi?id=156

That should have been fixed in 2.1.0

Or does that change not address this issue?
Comment 2 Mark Summers 2011-11-30 03:09:05 UTC
(In reply to comment #1)
> What version of slony are you running?

2.0.7

> 
> This sounds a lot like bug 156 
> http://bugs.slony.info/bugzilla/show_bug.cgi?id=156
> 
> That should have been fixed in 2.1.0
> 
> Or does that change not address this issue?

I agree that the fix for bug 156 should address this issue, although I have not tested it.

Sorry for the duplication but I did not find bug 156 in any of my searches.
Comment 3 Steve Singer 2011-11-30 13:14:35 UTC

*** This bug has been marked as a duplicate of bug 156 ***