Re: How to prevent "no wait lock" after a connection drop - Mailing list pgsql-general

From Tom Lane
Subject Re: How to prevent "no wait lock" after a connection drop
Date
Msg-id 13817.1533076425@sss.pgh.pa.us
Whole thread Raw
In response to How to prevent "no wait lock" after a connection drop  (Ertan Küçükoğlu <ertan.kucukoglu@1nar.com.tr>)
Responses RE: How to prevent "no wait lock" after a connection drop
List pgsql-general
=?iso-8859-9?B?RXJ0YW4gS/zn/Gtv8Gx1?= <ertan.kucukoglu@1nar.com.tr> writes:
> What I observe during my tests is that if I intentionally drop internet
> connection during any stage of data transfer (that is mostly while inserting
> to tables) application gives error and stop. For next sync operation (which
> runs every 5 mins) gets "no wait lock" error and exit without doing
> anything. That lock stage roughly stays for 1-2 hours or more.

This probably corresponds to the TCP timeout needed for the server's
kernel to decide the connection is lost; until then, the backend session
will just sit there waiting for more data, and it'll be holding whatever
locks it had too.

You could adjust the server's tcp_keepalives_xxx settings to make it
notice the connection drop more quickly.

            regards, tom lane


pgsql-general by date:

Previous
From: Ertan Küçükoğlu
Date:
Subject: How to prevent "no wait lock" after a connection drop
Next
From: Ron
Date:
Subject: Settings for fast restores