Deadlock Situation with Postmaster, Libpq and pgtclsh

From: Mark Grimsey <mgrimsey(at)compuserve(dot)com>
To: pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Deadlock Situation with Postmaster, Libpq and pgtclsh
Date: 1998-11-05 23:20:06
Message-ID: 199811051820_MC2-5F47-F926@compuserve.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)compuserve(dot)com

Browse pgsql-interfaces by date

  From Date Subject
Next Message The Hermit Hacker 1998-11-06 03:14:01 Re: [INTERFACES] crypt not included when compiling libpgtcl !!!!!!!
Previous Message Tom Lane 1998-11-05 23:16:27 Re: [INTERFACES] crypt not included when compiling libpgtcl !!!!!!!