Jeff threshar at torgo.978.org
Thu Nov 5 06:19:16 PST 2009
On Nov 5, 2009, at 12:09 AM, Nimesh Satam wrote:

> All,
>
> Is there any way to confirm that a certain insert has been completed  
> on the slave database? Would the sl_confirm or sl_event table be  
> useful for this?
>
> For eg: If I have a batch of 100 Inserts, how do I make sure that  
> all have been done on slave?
>
> Regards,
> Nimesh.


I've got this code which seems to work well.  I added a function to my  
DB access layer called "syncexec" that executes and waits for the  
slaves (up to a predefined interval).

You'll need to do your work inside a transaction and get the txn's  
txnid for this to work (you can obtain it via _cluster.getCurrentXid()

-------------- next part --------------
A non-text attachment was scrubbed...
Name: slony_syncwait.sql
Type: application/octet-stream
Size: 1765 bytes
Desc: not available
Url : http://lists.slony.info/pipermail/slony1-general/attachments/20091105/1e2ffd7b/slony_syncwait.obj
-------------- next part --------------


--
Jeff Trout <jeff at jefftrout.com>
http://www.stuarthamm.net/
http://www.dellsmartexitin.com/





More information about the Slony1-general mailing list