[unixODBC-support] Problem with achieving Serialization mode with unixODBC inspite it is working with Postgres
aditimittal15 at gmail.com
Tue Jun 25 11:17:39 BST 2013
I have an Application using unixodbc to access postgres server. Since, our
system is multithreaded environment where in multiple threads can access
the DB server simultaneuosly.
Hence for consistency issue, I need to set isolation mode to Serializable
for a given transaction.
I tried to by setting connection attribute by following two commands:
res = SQLSetConnectAttr(*phdbc,SQL_ATTR_TXN_ISOLATION,
res = SQLSetConnectOption( phdbc,SQL_TXN_ISOLATION,SQL_TXN_REPEATABLE_READ
But through none of them I could achieve serialized before. i.e.
Say serialized Trans T1 was ongoing, when there is Update on same record
through another serialized txn T2. Now in T1 I tried Update procedure on
Ideally in serialized mode, T1 should wait for T2 to commit and after that
it should return error saying transactions are not concurrent due to
But in myprogram both updates are being done successfully. and final result
remains the update done by txn T1 on that record.
So could you please help me out and let me know what wrong I have been
Unixodbc rpm in use: unixODBC-2.2.11-1.i386.rpm
Postgres in use: postgresql-9.2.4.tar.bz2
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the unixODBC-support