Received: from dub-img-12.compuserve.com (dub-img-12.compuserve.com [149.174.206.142]) by hub.org (8.9.1/8.9.1) with ESMTP id SAA19069 for ; Thu, 5 Nov 1998 18:21:08 -0500 (EST) (envelope-from mgrimsey@compuserve.com) Received: (from root@localhost) by dub-img-12.compuserve.com (8.8.6/8.8.6/2.16) id SAA22313 for pgsql-interfaces@postgresql.org; Thu, 5 Nov 1998 18:20:33 -0500 (EST) Date: Thu, 5 Nov 1998 18:20:06 -0500 From: Mark Grimsey Subject: Deadlock Situation with Postmaster, Libpq and pgtclsh Sender: Mark Grimsey To: pgsql-interfaces Message-ID: <199811051820_MC2-5F47-F926@compuserve.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id SAA19071 Help I have a simple database table that has 10 tuples of 3 fields. It is accessed by a number of C programs using libpq to check if certain fields contain the value 1 or 0. A pgtclsh program is the user interface for setting the value to either 1 or 0. The problem I have is that when a user tries to change the value from pgtclsh, the system locks up. The pgtclsh program connects to the database and then calls pg_exec with an UPDATE command to change the value. 9 times out of 10 it will work but every so often it locks all Postgres connections to the database and hangs, never returning to the next line in the pgtclsh program. This always happens when a C program using libpq is accessing the same table for a read. Am I doing something fundamentally wrong or is there a problem with pgtclsh accessing a table whilst others are too ? Thanks Mark Grimsey mgrimsey@compuserve.com