Jan Wieck JanWieck
Mon Nov 1 20:33:35 PST 2004
On 11/1/2004 1:38 PM, Andrew Sullivan wrote:

> On Mon, Nov 01, 2004 at 12:05:18PM -0600, Ed L. wrote:
>> >
>> > It could impose a pretty severe memory footprint with a lot of
>> > sequences, though.
>> 
>> By my rough guess, it will take around 128 bytes to store all data for a 
>> sequence along with a few data structure pointers.  
> 
> Well, if you can do it in 128 bytes, that's a different story.  How
> do you calculate that, though?  I'd be interested to know.

The DB connection that is generating the SYNC events is a permanent, 
long living one from the local slon daemon. So that tracking could even 
be done in less amount of memory within the corresponding backend. But 
the sl_seqlog rows are created right inside of createEvent() by calling 
a saved plan, one plan for storing all sequence values at once. It is 
questionable if that one prepared plan replaced with a separate 
SPI_execp() call for every sequence that did change will be much more 
efficient.

It would doubtless help on the replica of course if the origin would 
only store sl_seqlog rows for sequences that have changed since the last 
SYNC done withing the same backend.


Jan



-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck at Yahoo.com #


More information about the Slony1-general mailing list