Cyril SCETBON cscetbon.ext at orange-ftgroup.com
Mon Sep 10 08:06:51 PDT 2007

Jan Wieck wrote:
> 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.
when I execute this command on the master :

 insert into t1(ise) values('cyril100001');

I can see in sl_log_1 :

psql>select log_cmddata from sl_log_1;
 (ise,id,id2) values ('cyril100001','24161',NULL)

dbtest=# \d t1;
                                Table "public.t1"
 Column |         Type          |                    
Modifiers                   
--------+-----------------------+-------------------------------------------------
 ise    | character varying(54) | not null
 id     | integer               | not null default 
nextval('t1_id_seq'::regclass)
 id2    | integer               |
Indexes:
    "t1_pkey" PRIMARY KEY, btree (ise)
Triggers:
    "_CLUSTER1_logtrigger_1" AFTER INSERT OR DELETE OR UPDATE ON t1 FOR 
EACH ROW EXECUTE PROCEDURE "_CLUSTER1".logtrigger('_CLUSTER1', '1', 'kvv')

I agree for id which is an auto_increment but not for id2 :-(

In another plateform my table has more than  100 columns as said earlier 
and that's really matter :-(






>
>> 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?
>
Slony on slave was stopped, and no DML have been done during this operation.
>
> Jan
>

-- 
Cyril SCETBON - Ingénieur bases de données
AUSY pour France Télécom - SCR/HDI/DOP/HEBEX

Tél : +33 (0)4 97 12 87 60
Jabber : cscetbon at jabber.org
France Telecom - Orange
790 Avenue du Docteur Maurice Donat 
Bâtiment Marco Polo C2 
06250 Mougins
France

***********************************
Ce message et toutes les pieces jointes (ci-apres le 'message') sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration. Le Groupe France
Telecom decline toute responsabilite au titre de ce message s'il a ete
altere, deforme ou falsifie.
Si vous n'etes pas destinataire de ce message, merci de le detruire
immediatement et d'avertir l'expediteur.
***********************************
This message and any attachments (the 'message') are confidential and
intended solely for the addressees.
Any unauthorised use or dissemination is prohibited.
Messages are susceptible to alteration. France Telecom Group shall not be
liable for the message if altered, changed or falsified.
If you are not recipient of this message, please cancel it immediately and
inform the sender.
************************************



More information about the Slony1-general mailing list