Re: pg_cancel_backend() does not work with buzz queries - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: pg_cancel_backend() does not work with buzz queries
Date
Msg-id 20071023073504.GA10684@svana.org
Whole thread Raw
In response to Re: pg_cancel_backend() does not work with buzz queries  ("Sergey Konoplev" <gray.ru@gmail.com>)
Responses Re: pg_cancel_backend() does not work with buzz queries  ("Sergey Konoplev" <gray.ru@gmail.com>)
List pgsql-general
On Tue, Oct 23, 2007 at 09:56:26AM +0400, Sergey Konoplev wrote:
> I took a look at TCP state with netstat:
>
> pgdb:/base/PG-Data # netstat -pna |grep 8590
> tcp        1      0 127.0.0.1:5432          127.0.0.1:35442
> CLOSE_WAIT  8590/postgres: kono

CLOSE_WAIT means that the client (in this case SSH) has shutdown() its
end of the connection and evidently postgresql hasn't noticed. However,
SSH has not closed its socket entirely, because then the write would
fail.

Can you strace the SSH daemon, my bet is that it's also stuck on a
write(), to the original client. It would also be interesting to know
what the original client is doing, since it's obviously still alive.
Looks like somewhere along the chain a program called shutdown() but is
no longer reading incoming data...

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: "Sergey Konoplev"
Date:
Subject: Re: pg_cancel_backend() does not work with buzz queries
Next
From: Rafael Martinez
Date:
Subject: alter database tablespace