Deadlock Situation with Postmaster, Libpq and pgtclsh - Mailing list pgsql-interfaces

From Mark Grimsey
Subject Deadlock Situation with Postmaster, Libpq and pgtclsh
Date
Msg-id 199811051820_MC2-5F47-F926@compuserve.com
Whole thread Raw
List pgsql-interfaces
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



pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: [INTERFACES] crypt not included when compiling libpgtcl !!!!!!!
Next
From: The Hermit Hacker
Date:
Subject: Re: [INTERFACES] crypt not included when compiling libpgtcl !!!!!!!