pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Madison <jeff@ikano.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Connection terminates but postmaster proc lives on...?
Date: Wed, 17 Apr 2002 23:47:13 -0400
Message-ID: <5896.1019101633@sss.pgh.pa.us> (raw)
In-Reply-To: <007201c1e63e$aad57040$58c2d0cd@JEFF>
References: <007201c1e63e$aad57040$58c2d0cd@JEFF>

"Jeff Madison" <jeff@ikano.com> writes:
> ...  What we are seeing is when
> people terminate the application in the middle of a query many times
> postmaster does not see the connection terminate or at least ignores it
> and then proceeds to take a large amount of system resources and never
> dies.

As a general rule, the backend will not notice a connection closure
until it next tries to read from the connection.  If you issue some
query that takes a long time to compute, and then give up and abort
your client, the query will still run.

If you're not sure what query you are running, you could attach to
one of the CPU-hogging backends with gdb and issue "p debug_query_string"
to see what it's working on.

			regards, tom lane



view thread (2+ messages)

Message-ID: <5896.1019101633@sss.pgh.pa.us>
Permalink:  ../5896.1019101633@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5896.1019101633@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jeff@ikano.com
  Subject: Re: Connection terminates but postmaster proc lives on...?
  In-Reply-To: <5896.1019101633@sss.pgh.pa.us>
  References: <007201c1e63e$aad57040$58c2d0cd@JEFF> <5896.1019101633@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox