pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Grimsey <mgrimsey@compuserve.com>
To: pgsql-interfaces <pgsql-interfaces@postgresql.org>
Subject: Deadlock Situation with Postmaster, Libpq and pgtclsh
Date: Thu, 5 Nov 1998 18:20:06 -0500
Message-ID: <199811051820_MC2-5F47-F926@compuserve.com> (raw)

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

 



Message-ID: <199811051820_MC2-5F47-F926@compuserve.com>
Permalink:  ../199811051820_MC2-5F47-F926@compuserve.com/
Also on:    postgresql.org/message-id/199811051820_MC2-5F47-F926@compuserve.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: mgrimsey@compuserve.com
  Subject: Re: Deadlock Situation with Postmaster, Libpq and pgtclsh
  In-Reply-To: <199811051820_MC2-5F47-F926@compuserve.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox