Jeff threshar at torgo.978.org
Thu Nov 19 07:20:12 PST 2009
On Nov 12, 2009, at 7:01 AM, Nimesh Satam wrote:

> Jeff,
>
> Thanks for the reply, can you let us know how we get the values for  
> the function inputs p_start , p_txid ?
>
> Regards,
> Nimesh.

select now() as ctime, _replication.getCurrentXid() as txid")

and then you can feed those into syncwait

remember that you need to start a txn, do your insert, then call  
these.  If you do it outside the txn I don't know what txnid is  
related to the row inserted.

>
> On Thu, Nov 5, 2009 at 7:49 PM, Jeff <threshar at torgo.978.org> wrote:
>
> 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()
>
>
>
>
> --
> Jeff Trout <jeff at jefftrout.com>
> http://www.stuarthamm.net/
> http://www.dellsmartexitin.com/
>
>
>
>
>

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





More information about the Slony1-general mailing list