Andrew Sullivan ajs
Mon Nov 1 15:59:22 PST 2004
On Mon, Nov 01, 2004 at 08:05:39AM -0600, Ed L. wrote:
> 
> Not necessarily.  Slony is already polling all sequences at each sync 
> interval.  A first-level improvement might be for slon to simply keep track 
> of what each last_value was the last time we checked, and if its not 
> different from *this* check, don't update the slave.  That would eliminate 
> the redundant updates without any touching of nextval() functionality.

It could impose a pretty severe memory footprint with a lot of
sequences, though.  OTOH, the scan could be pretty expensive with a
lot of sequences, too.

> know if there is a better way, but if one could trigger off a sequence 
> change, that would seem to remove the polling requirement as well as the 
> internal tracking need.

A trigger on a sequence change is a terrible idea.  The whole reason
sequences are transactional, &c., is to eliminate all the concurrency
issues that might arise.  Adding a trigger or any other such
functionality is just a recipe for concurrency costs.  

A

-- 
Andrew Sullivan  | ajs at crankycanuck.ca
I remember when computers were frustrating because they *did* exactly what 
you told them to.  That actually seems sort of quaint now.
		--J.D. Baldwin


More information about the Slony1-general mailing list