Locking record behaviour when using transaction -BEGIN/END

From: "Juan Vergara" <JVergara(at)Equinox(dot)com>
To: pgsql-hackers(at)hub(dot)org
Subject: Locking record behaviour when using transaction -BEGIN/END
Date: 1999-11-10 17:38:51
Message-ID: 85256825.0060F163.00@notes.EQUINOX.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, Guys . I just installed the latest POSTGRES binary 6.5.2 for
REDHAT 6.0 and reading the HISTORY file, it says that the deadlock
problem with the timeout was fixed in 6.3.
So, I went and open two psql sessions and tried to update the same
record inside a transaction (one for each session). The thing is that
the other session that is waiting for the record to be released by the
first session keeps waiting forever - Ther is no even a timeout deadlock
message.

Is there any parameter to be setup before you fire the postmaster
proccess in order to get deadlock messages back to the client ?

I thought it was fixed ...

This was the response from Thomas Lockhart

> And it is. Your case is not a classic "deadlock" in the database
> sense, but is just one client waiting for another to finish. That is
> different than deadlock, in which a client *could never possibly
> finish* because it is holding a lock that another client is waiting
> for, while also waiting for a lock that the second client is holding.

Thanks Thomas for your promptly answer..

So, is there anyway for the client connection to get out of the waiting
proccess for the other connection to release the record?
Presently, my application looks like it is hung up, so a user would think that
something wrong with the client software. It would be pretty useful for the
backend to send a message saying that the record is locked so the front end is
able to decide to do something else or retry to get the record or even be able
to put a message box saying "waiting for record to be released" .

How I can acomplish this with the present POSTGRES locking mechanism ?

Thanks,
Juan Carlos Vergara
jvergara(at)equinox(dot)com

Browse pgsql-hackers by date

  From Date Subject
Next Message Bernard Frankpitt 1999-11-10 19:31:38 Re: [HACKERS] Indent
Previous Message Thomas Lockhart 1999-11-10 17:23:47 Re: [HACKERS] CORBA STATUS