Re: Lock and unlock registry

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "carlos gustavo" <cgcl(dot)comp(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Lock and unlock registry
Date: 2007-11-16 20:16:52
Message-ID: 1966.1195244212@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"carlos gustavo" <cgcl(dot)comp(at)gmail(dot)com> writes:
> How can Postgres detect the connection lost and remove all locks made by
> this connection? It's a configuration in Postgres or have another way to
> lock a registry?

It is not Postgres' responsibility to detect a lost network connection,
it is the network stack's responsibility. When the network code reports
to the backend that the connection is lost, we'll clean up and exit the
session appropriately.

I think your real complaint is that you think the network code's timeout
for declaring the connection lost is too long. On some platforms you
can shorten the timeout by making the tcp_keepalive settings more
aggressive, but be aware that doing so violates various RFCs and may
result in less-reliable connections.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Sean Davis 2007-11-16 20:36:02 Re: XML schema
Previous Message Peter Eisentraut 2007-11-16 19:14:21 Re: XML schema