Subject: Timeout on deadlock

From: Mike Doughney <[email-masked]>
Date: Wed, 19 Oct 1994 03:20:37 -0400

I've been having considerable difficulty with postgres locking up when
two programs are attempting to access the same database at the same
time.  I've written two programs, one is a batch process which is
retrieving and appending records, the other an interactive program
that performs only retrievals.  When I attempt to do interactive
retrievals at the same time the batch is running I frequently receive
these types of messages from one or the other process (and
occasionally both):

: NOTICE:Oct 19 03:06:33:Timeout -- possible deadlock
: WARN:Oct 19 03:06:33:WaitOnLock: error on wakeup - Aborting this transaction

On one occasion the batch process simply quit entirely with this
message, which I gather is from PQexec:

: Error: No response from the backend, exiting...

On one other occasion the batch process repeatedly timed out until my
program quit trying (after 5 tries) and exited; the retries continued
after the interactive program was finished.

The batch process is using a begin/end block for every input record;
each input record generates anywhere from 5 to 50 appends and a number
of retrievals.

Postgres version is 4.1 running under SunOS 4.1.3 with Kerberos
authentication.  I'm using pgperl.

Any suggestions, fixes, patches, etc. much appreciated.

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "[email-masked]"

   If this fails, send mail to "[email-masked]" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================