Jan Wieck JanWieck at Yahoo.com
Mon Sep 10 07:51:31 PDT 2007
On 9/10/2007 10:07 AM, Cyril SCETBON wrote:
> Hi,
> 
> We're hitting 400 requests per second and noticed that sl_log_? are 
> growing a lot. This is also due to the fact that our tables have a lot 
> of columns (more that 100). We noticed that slony stores each column and 
> its value for each request in sl_log_x. Would it not be more optimized 
> to store just the user request ? Actually, a user is just updating a few 
> column, or inserting a tuple by giving some attributes but not all, 
> however as slony stores every column with its value it sl_log_x, these 
> tables are growing very fast :-(

Slony only logs columns where the value actually has changed. Please 
explain in detail how you propose that the log table would contain which 
columns have changed without naming them.

> How logswitch is used in slony ? I try a logswitch.start() and I had to 
> move date between sl_log_1 and sl_log_2 to finish it. How does it work ? 
> which thread is using this function ?

Slony does this by itself. Once a logswitch is initiated, slony waits 
until the regular cleanup procedure has removed all log tuples from the 
old log table. At that point, it will truncate the table (instead of 
vacuuming it) and finish the logswitch.

Moving log tuples between the tables manually is a good way to screw up 
replication. Are you actually 100% sure that slony before, during and 
right after that operation was in union select mode scanning both logs 
together?


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