From: Markus Schaber <schabi@logix-tt.com>
To: pgsql-jdbc@postgresql.org
Cc: PostGIS Development Discussion <postgis-devel@postgis.refractions.net>
Subject: Re: "Hanging Connection" blocks access to table (JBossMQ)
Date: Fri, 13 Oct 2006 17:31:02 +0200
Message-ID: <452FB136.3050605@logix-tt.com> (raw)
In-Reply-To: <29655.1160750114@sss.pgh.pa.us>
References: <C152B99C.1D17%mgoldner@agmednet.com>
<13679.1160594122@sss.pgh.pa.us>
<452F7E19.5020800@logix-tt.com>
<29655.1160750114@sss.pgh.pa.us>
Hi, Tom,
Tom Lane wrote:
>> Is there any possibility that we make a backend realize this SIGIO (or
>> whatever it gets) when the connection is closed?
> I don't think it'd be a net win to add cycles to every query to check
> the connection every so often.
The SIGIO could set a flag variable via the interrupt handler, and then
the backend could check that variable in a few, selected places. This
should keep the overhead pretty low. And when the connection is low,
there really is no point in continuing to work on the current query.
>> The same is for very long running C-Code functions (like PostGIS
>> geomUnion() on geometries with millions of vertices), those also tend to
>> block the backend for long times, without any possibility to kill it
>> except SIGKILL.
>
> That's the fault of the C code ... it should be doing
> CHECK_FOR_INTERRUPTS periodically in any long-running loops.
The problem is that most of those long-running functions are in
3rd-party libs like GEOS and ProJ, which are basically only wrapped by
PostGIS, so it won't be easy to sprinkle them with CHECK_FOR_INTERRUPTS.
I suspect that plR might suffer from the same problem.
So we'll have to live with this.
Thanks,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
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-jdbc@postgresql.org
Cc: schabi@logix-tt.com, postgis-devel@postgis.refractions.net
Subject: Re: "Hanging Connection" blocks access to table (JBossMQ)
In-Reply-To: <452FB136.3050605@logix-tt.com>
References: <C152B99C.1D17%mgoldner@agmednet.com> <13679.1160594122@sss.pgh.pa.us> <452F7E19.5020800@logix-tt.com> <29655.1160750114@sss.pgh.pa.us> <452FB136.3050605@logix-tt.com>
* 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