[Bucardo-general] Bucardo problem with Kids

Ben Allen bsa at lanl.gov
Tue Apr 28 19:54:21 UTC 2009


Try the following. Check for any typos. After you create the sync make  
sure bucardo_delta, bucardo_track, and bucardo_conflicts tables are in  
each database. Remember to check the bucardo schema. Next check that  
the user table on each database has new bucardo related triggers.

Lastly, what version of Bucardo are using. What version of PostgreSQL,  
and what OS?

INSERT INTO db(name, dbname, dbhost, dbuser, dbpass) VALUES
	('DB_JOC1', 'DB_TEST', '192.9.210.117', 'postgres', 'postgres'),
	('DB_SOC1', 'DB_TEST', '192.9.210.61', 'postgres', 'postgres');

INSERT INTO goat(db, schemaname, tablename, pkey, standard_conflict)  
VALUES
	('DB_JOC1', 'public', 'user','name','source');

INSERT INTO herd(name) VALUES ('herd1');

INSERT INTO herdmap(herd,goat)
	SELECT 'herd1', id FROM goat WHERE db='DB_JOC1';

# Note this is a swap sync instead of a pushdelta
INSERT INTO sync(name,source,targetdb,synctype,checktime)
	VALUES ('sync1', 'herd1', 'DB_SOC1', 'swap', '2 minutes');


Ben

On Apr 24, 2009, at 3:08 AM, Stevens.Lebas wrote:

> That's db table:
>
> "DB_JOC1 
> ";"192.9.210.117 
> ";"5432";"DB_TEST";"postgres";"postgres";"''";"";"active"; 
> 0;0;"2009-04-17
> 12:51:36.114204+02"
> "DB_SOC1 
> ";"192.9.210.61 
> ";"5432";"DB_TEST";"postgres";"postgres";"''";"";"active"; 
> 0;0;"2009-04-17
> 12:52:27.753489+02"
>
> That's goat table :
>
> 1 
> ;"DB_JOC1 
> ";"public 
> ";"user 
> ";"table";"name";"text";FALSE;;"";;;FALSE;"source";TRUE;"2009-04-17
> 12:53:59.505521+02"
>
> The Herd Table:
>
> "herd1";"2009-04-17 12:54:51.697439+02"
>
> The herdMap table:
>
> "herd1";1;0;"2009-04-17 12:56:14.282928+02"
>
> The Sync Table:
>
> "user_name 
> ";"herd1 
> ";"DB_SOC1";"";"pushdelta";TRUE;TRUE;FALSE;"copy";"''";"delete"; 
> 0;TRUE;FALSE;"";"active";FALSE;FALSE; 
> 0 
> ;"SERIALIZABLE 
> ";"pg_class";"pg_class";TRUE;"00:00:00";"00:00:00";"2009-04-17
> 12:57:07.264462+02"
>
>
> I launch Bucardo and in table q,there is
>
> "user_name";"DB_JOC1";"DB_SOC1"; 
> 11726;;"pushdelta";;;;"";"";"";"";"2009-04-20
> 14:44:12.405513+02"
>
> But any Kids process this line (request with '* is null' return  
> always 0e0)
>
> Ask me if you need more information.
>
> Thanks,
>
> Stevens
>
> 2009/4/23, Ben Allen <bsa at lanl.gov>:
>> Be a lot easier if you could just duplicate what statements you
>> inserted into the Bucardo database. A whole dump of the database will
>> be quite messy.
>>
>> Ben
>>
>> On Apr 23, 2009, at 5:17 AM, Stevens.Lebas wrote:
>>
>>> Hi Ben,
>>>
>>> I join a backup script of bucardo database. Tell me if it's good for
>>> you.
>>>
>>> Stevens
>>>
>>>
>>> 2009/4/23, Ben Allen <bsa at lanl.gov>:
>>>> Can you copy and paste the statements you added to your bucardo
>>>> database to setup the sync? Otherwise all I can say is make sure  
>>>> you
>>>> did all the steps in the Bucardo documentation.
>>>>
>>>> Ben
>>>>
>>>> On Apr 22, 2009, at 1:16 PM, Stevens.Lebas wrote:
>>>>
>>>>> Hi Ben,
>>>>>
>>>>> I've just two little database to test  with only one table with  
>>>>> only
>>>>> two column (Table 'user' with column generated oid and column
>>>>> 'name').
>>>>>
>>>>> The target database contains no user, but when i add user in  
>>>>> source
>>>>> database, nothing happened,only controller add new line in table  
>>>>> q.
>>>>>
>>>>> All request of type
>>>>>
>>>>> "UPDATE bucardo.q
>>>>> SET    started=timeofday()::timestamptz, pid = ?
>>>>> WHERE  sync=?
>>>>> AND    targetdb=?
>>>>> AND    started IS NULL"
>>>>>
>>>>> always return 0 (in table q there is matched row).
>>>>> When i delete 'started is null', update return not 0.
>>>>>
>>>>> When a 'is null' is done on column text,time... (not on integer
>>>>> column,that's fine),result of update was 0.
>>>>>
>>>>> Thank you for your help,
>>>>>
>>>>> Stevens
>>>>>
>>>>> 2009/4/22, Ben Allen <bsa at lanl.gov>:
>>>>>> Is there actually any new data on either side of the of the  
>>>>>> sync to
>>>>>> be
>>>>>> copied over? Usually this message means, as long as everything is
>>>>>> setup correct, quite literal there's nothing for Bucardo to do.
>>>>>>
>>>>>> Ben
>>>>>>
>>>>>> On Apr 22, 2009, at 11:01 AM, Stevens.Lebas wrote:
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> i'm trying to replicate two databases with bucardo. Bucardo is
>>>>>>> launch
>>>>>>> and bucardo database is correctly filled. When i change a column
>>>>>>> in
>>>>>>> table to replicate, CTL detected but KID do nothing. Table q is
>>>>>>> filled
>>>>>>> by Controller, but kids do nothing.
>>>>>>>
>>>>>>> When i stop bucardo and restart it, KID says "Nothing to do: no
>>>>>>> entry
>>>>>>> found in the q table for this sync", but table q is filled.  
>>>>>>> After
>>>>>>> investigation, that's come from line 3682 in file Bucardo.pm on
>>>>>>> request "qsetstart".
>>>>>>> This update return already 0E0 in variable $count.
>>>>>>>
>>>>>>> So i try to modify the request and problem come from 'started is
>>>>>>> null'. When i delete this,the update return a value different  
>>>>>>> from
>>>>>>> 0.
>>>>>>>
>>>>>>> I do a perl script with this request an DBD::pg, and it's ok.
>>>>>>> Perhaps the DBIx::Safe?
>>>>>>>
>>>>>>> Has someone an idea ?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Best regards,
>>>>>>>
>>>>>>> Stevens
>>>>>>> _______________________________________________
>>>>>>> Bucardo-general mailing list
>>>>>>> Bucardo-general at bucardo.org
>>>>>>> https://mail.endcrypt.com/mailman/listinfo/bucardo-general
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>



More information about the Bucardo-general mailing list