Bug 166

Summary: Provide a way of counting the number of outstanding operations in a sync
Product: Slony-I Reporter: Steve Singer <ssinger>
Component: core scriptsAssignee: Slony Bugs List <slony1-bugs>
Status: NEW    
Severity: enhancement CC: slony1-bugs
Priority: low    
Version: devel   
Hardware: All   
OS: All   

Description Steve Singer 2010-11-17 05:38:55 PST
This is a feature request.

It would be very useful from a 'what the heck is my system doing' point of view
to know how many operations make up each outstanding SYNC request.

A system that is behind by 1000 SYNC's with no row edits in any of them is in a
very different state than a system that is 1000 SYNC's behind each with 10,000
UPDATE statements.

Similarly if the next/current SYNC to be processed consists of a million rows
that might explain why replication 'seems' to have stopped from an sl_status
point of view.

The test_slony_state.pl script seems like the most logical place to add this
though other ideas are welcome.
Comment 1 Christopher Browne 2010-11-17 09:51:40 PST
The logic for this is liable to need a stored function (or similar) which
duplicates the logic in remote_worker.c which associates XIDs with SYNCs.

If we implement this (which could be quite a good idea!), this might provide a
way to shift the SYNC contents evaluation out of sync_event() (in
src/slon/remote_worker.c) into (a) stored function(s).

It's definitely nontrivial, but, if done, would pull a pretty complicated piece
out of the C code.