Re: "Hanging Connection" blocks access to table (JBossMQ)

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Re: "Hanging Connection" blocks access to table (JBossMQ)
Дата
Msg-id 452FB136.3050605@logix-tt.com
обсуждение исходный текст
Ответ на Re: "Hanging Connection" blocks access to table (JBossMQ)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: "Hanging Connection" blocks access to table (JBossMQ)
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: "Hanging Connection" blocks access to table (JBossMQ)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: "Hanging Connection" blocks access to table (JBossMQ)