Re: Connection terminates but postmaster proc lives on...?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jeff Madison" <jeff(at)ikano(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Connection terminates but postmaster proc lives on...?
Date: 2002-04-18 03:47:13
Message-ID: 5896.1019101633@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Jeff Madison" <jeff(at)ikano(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2002-04-18 03:51:30 Re: Alternate database locations
Previous Message Jeremy Buchmann 2002-04-18 00:35:28 Re: Large Join Dies