Lock table

From: "Carmen Wai" <wai_carmen(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Lock table
Date: 2003-05-28 15:14:11
Message-ID: Law15-F71Ch49i4Lvqt0005a2e4@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello:

I am using Postgresql 7.2.1, writing c++ program using unixODBC on linux
platform to access data in the postgresql DB.

My program will start multiple-threads, and each thread will make a
connection to the DB and insert a record to a table. In order to avoid the
insertion of duplicate record to the table at the same time, each thread
will begin a transaction, then lock the table, after insertion of record, it
will either commit/rollback to unlock the table.

When I start my program, I find that there will is a dead lock in the
locking of table by my threads and whole table will be locked forever until
I kill my program. Is this the problem on postgresql DB or the unixODBC
driver?

What can I do to control concurrency?

Thanks a lot!
Carmen

_________________________________________________________________
Get 10Mb extra storage for MSN Hotmail. Subscribe Now!
http://join.msn.com/?pgmarket=en-hk

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rory Campbell-Lange 2003-05-28 15:42:21 Re: Finding line of bug in sql function
Previous Message Mariusz Jadczak 2003-05-28 14:50:30 Re: Finding line of bug in sql function