Skip site navigation (1) Skip section navigation (2)

Re: update table with row locking

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: Mark <sendmailtomark(at)yahoo(dot)com>, Michael Fuhr <mike(at)fuhr(dot)org>,pgsql-general(at)postgresql(dot)org
Subject: Re: update table with row locking
Date: 2004-12-29 18:30:43
Message-ID: 11768.1104345043@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-general
Bruno Wolff III <bruno(at)wolff(dot)to> writes:
> I believe the locks get released when the backend process terminates.
> Depending on how the client dies, there may be a significant delay before
> the backend process terminates.

I'd expect a client-application crash to be reported to the backend
promptly.  The cases where there might be significant delay include loss
of network connectivity and hard crash of the whole client machine (so
that its kernel forgets there is an open connection).  In either case
the backend probably won't be told the connection is dead until a TCP
keepalive timeout elapses ... which is on the order of an hour or more
given an RFC-compliant TCP stack.

(If the crash happens while actively transferring data then the relevant
timeouts are much shorter.  The slow case is when the backend is just
sitting idle-in-transaction, and awaiting a new client command that
never comes.)

			regards, tom lane

In response to

pgsql-general by date

Next:From: Dann CorbitDate: 2004-12-29 21:01:14
Subject: Re: BCD format
Previous:From: Michael FuhrDate: 2004-12-29 18:20:34
Subject: Re: update table with row locking

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group