[Bucardo-general] MCP PID and automatic syncs

Greg Sabino Mullane greg at endpoint.com
Wed Jun 17 19:00:40 UTC 2009

> 1) MCP PID
> I believe that PID written in /var/run/bucardo/bucardo.pid is a wrong
> one.

Thanks, definitely a bug. I just committed a quick fix. Rather than
delaying the creation, I have it overwrite (as the send_mail function
may take a finite amount of time).

> 2) automatic syncs (swap)
> I have also done some work on testing the connections in a way that
> might be interesting - using Net::Ping, the syn variant, which checks if
> the port at dbhost:dbport is open and can be set to timeout very quicky
> compared to the timeout of the connect_database (which for me was at
> around 3 minutes for hosts to which the route has been broken, which is
> the most common scenario that I am trying to address).

This might be better addressed by setting the environment variable
PGCONNECT_TIMEOUT, which should in theory work with connect_database
(via DBD::Pg, via libpq).

> My goal here is to have the syncs go up and down automatically depending
> on the availability of the connections (so that one dropped connection
> does not ruin a day for all the others)

I'm working on something sort of similar, in that you can set a sync to
tolerate a disconnected host, such that (for example) someone using a
master to many slaves configuration would not have to do anything
special if one of the slaves went down - Bucardo would mark that
targetdb as inactive and keep going with the others. Then one could
restart that sync once the targetdb was up again, perhaps with a
onetimecopy=2 as needed.

> This seems to work now and I am wondering - should I leave it to work
> around bucardo_ctl or should I try to integrate with bucardo?

Patches welcome: it's not clear how much overlap there is between my
idea and yours. In general though, such logic should go into bucardo
itself, and be controlled by config variables and/or a column in the
sync table.

Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 225 bytes
Desc: OpenPGP digital signature
Url : https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20090617/cccd7014/attachment.bin 

More information about the Bucardo-general mailing list