Re: zombie connections

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: zombie connections
Date: 2020-04-03 14:00:47
Message-ID: CAFj8pRBJUpzzku76x-ZptchequjT0NEnJUydZHN-Gv8GeR=9Tw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

pá 3. 4. 2020 v 15:52 odesílatel Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
napsal:

> On Fri, 3 Apr 2020 at 08:30, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
>>
>> I don't have a terribly specific idea about how to improve this, but
>> is there some way that we could, at least periodically, check the
>> socket to see whether it's dead? Noticing the demise of the client
>> after a configurable interval (maybe 60s by default?) would be
>> infinitely better than never.
>>
>
> Does it make any difference if the query is making changes? If the query
> is just computing a result and returning it to the client, there is no
> point in continuing once the socket is closed. But if it is updating data
> or making DDL changes, then at least some of the time it would be
> preferable for the changes to be made. Having said that, in normal
> operation one wants, at the client end, to see the message from the server
> that the changes have been completed, not just fire off a change and hope
> it completes.
>

I prefer simple solution without any "intelligence". It is much safer to
close connect and rollback. Then it is clean protocol - when server didn't
reported successful end of operation, then operation was reverted - always.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-04-03 14:06:26 Re: WAL usage calculation patch
Previous Message Robert Haas 2020-04-03 13:57:18 Re: zombie connections