Jeff,
Thanks Jeff for your reply. But I am not able to locate the "getCurrentXid"
in my slony functions. Can you tell me where I will be able to find this
function? Currently I am using slony-2.0.1
Also the function passed contains column ev_maxxid, ev_xip from sl_event.
But I am not able to locate the same columns in sl_event of the above slony
installation.
Table "_cluster.sl_event"
Column | Type | Modifiers
--------------+-----------------------------+-----------
ev_origin | integer | not null
ev_seqno | bigint | not null
ev_timestamp | timestamp without time zone |
ev_snapshot | txid_snapshot |
ev_type | text |
ev_data1 | text |
ev_data2 | text |
ev_data3 | text |
ev_data4 | text |
ev_data5 | text |
ev_data6 | text |
ev_data7 | text |
ev_data8 | text |
Indexes:
"sl_event-pkey" PRIMARY KEY, btree (ev_origin, ev_seqno)
Can you correct me if I am missing anything?
Regards,
Nimesh.
On 11/19/09, Jeff <[email protected]> wrote:
>
>
> 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 <[email protected]> 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 <[email protected]>
>> http://www.stuarthamm.net/
>> http://www.dellsmartexitin.com/
>>
>>
>>
>>
>>
>>
> --
> Jeff Trout <[email protected]>
> http://www.stuarthamm.net/
> http://www.dellsmartexitin.com/
>
>
>
>
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general