Bug 271

Summary: Add health check: Periodic comparison of in-memory config against database
Product: Slony-I Reporter: Christopher Browne <cbbrowne>
Component: slonAssignee: Jan Wieck <jan>
Status: ASSIGNED ---    
Severity: enhancement CC: slony1-bugs
Priority: low    
Version: devel   
Hardware: All   
OS: All   

Description Christopher Browne 2012-06-27 12:26:37 UTC
Occasionally, problems seem to arise where the slon's configuration in-memory falls out of sync with what is stored in the DB.

Thought: As part of the maintenance thread, validate that they are the same.

If any difference is found, dump the in-memory config and the DB config to logs, at some form of debug level.  (Possibly warning?)  If they are the same, indicate that they agree.

Need to check such things as:
- Node list (sl_node)
- Paths (sl_path)
- Subscriptions (sl_subscribe)
Comment 1 Christopher Browne 2012-06-28 14:34:03 UTC
I'm noticing that only the local node's share of sl_path is loaded in, so the data relevant to that is a combination of sl_node+sl_path data.

Branch set up to track this:

https://github.com/cbbrowne/slony1-engine/tree/bug271

Here is a patch which does the compare of sl_node+sl_path to the rtcfg_node structure:

https://github.com/cbbrowne/slony1-engine/commit/34dedfc04c664dbb48f9c7cc0e7e5e18c43e75f3
Comment 2 Christopher Browne 2012-06-29 10:52:50 UTC
Augmenting with sl_set/sl_subscribe data:

https://github.com/cbbrowne/slony1-engine/commit/c95c6640a5a7a0a5cd52bb7eb0d79eb46c6953e4