From: | Markus Schaber <schabi(at)logix-tt(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Cc: | PostGIS Development Discussion <postgis-devel(at)postgis(dot)refractions(dot)net> |
Subject: | Re: "Hanging Connection" blocks access to table (JBossMQ) |
Date: | 2006-10-13 15:31:02 |
Message-ID: | 452FB136.3050605@logix-tt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-10-13 15:55:48 | Re: "Hanging Connection" blocks access to table (JBossMQ) |
Previous Message | Tom Lane | 2006-10-13 14:35:14 | Re: "Hanging Connection" blocks access to table (JBossMQ) |