Bug 166 - Provide a way of counting the number of outstanding operations in a sync
Summary: Provide a way of counting the number of outstanding operations in a sync
Status: NEW
Alias: None
Product: Slony-I
Classification: Unclassified
Component: core scripts (show other bugs)
Version: devel
Hardware: All All
: low enhancement
Assignee: Slony Bugs List
URL:
Depends on:
Blocks:
 
Reported: 2010-11-17 05:38 UTC by Steve Singer
Modified: 2010-11-17 09:51 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 Steve Singer 2010-11-17 05:38:55 UTC
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 UTC
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.