Lock table - Mailing list pgsql-general

From Carmen Wai
Subject Lock table
Date
Msg-id Law15-F71Ch49i4Lvqt0005a2e4@hotmail.com
Whole thread Raw
Responses Re: Lock table  (Richard Huxton <dev@archonet.com>)
List 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


pgsql-general by date:

Previous
From: Mariusz Jadczak
Date:
Subject: Re: Finding line of bug in sql function
Next
From: Rory Campbell-Lange
Date:
Subject: Re: Finding line of bug in sql function