[Bucardo-general] custom selection
Greg Sabino Mullane
greg at endpoint.com
Fri Mar 5 01:53:54 UTC 2010
> Is it possible to setup bucardo to replicate part of a table ?
> What I have is a source and target db with identical tables.
> There is one field (size between 2kb and 100mb) that I would
> like to not replicate. The field specification says it is ok to be null.
> Can I tell bucardo to not copy this particular field ?
Yes. This is a case for the "customselect" column - just set it to a
SELECT statement that pulls out the rows you do want, e.g.
bucardo_ctl update table foobar customselect="SELECT a,b,c,d FROM foobar"
Make sure you also set usecustomselect to "true" for any sync that needs it.
(Thus you can one sync that replicates all columns, and one that does not):
bucardo_ctl update sync mysync usecustomselect=true
See also the t/11-customselect.t test for a working example.
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 163 bytes
Desc: not available
Url : https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20100304/b67f0486/attachment.bin
More information about the Bucardo-general