Re: Lock and unlock registry - Mailing list pgsql-novice

From Tom Lane
Subject Re: Lock and unlock registry
Date
Msg-id 1966.1195244212@sss.pgh.pa.us
Whole thread Raw
In response to Lock and unlock registry  ("carlos gustavo" <cgcl.comp@gmail.com>)
List pgsql-novice
"carlos gustavo" <cgcl.comp@gmail.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

pgsql-novice by date:

Previous
From: "Andrew Hammond"
Date:
Subject: Re: [Slony1-general] 2 problems
Next
From: Tom Lane
Date:
Subject: Re: Building full-text index