Re: Deadlock detection

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Deadlock detection
Дата
Msg-id 1232537440.2327.365.camel@ebony.2ndQuadrant
обсуждение исходный текст
Ответ на Re: Deadlock detection  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
On Wed, 2009-01-21 at 23:38 +1300, Oliver Jowett wrote:
> Simon Riggs wrote:
>
> > If not, other suggestions and viewpoints welcome. Thanks,
>
> If you want a minimally invasive approach (in terms of rewriting driver
> code) and some extra overhead isn't a problem then I would suggest
> something like this:

...

> The obvious costs of this are the extra thread per connection, the
> context switches needed to actually do the writes, and however much
> space you need for all the write buffers.

Thanks very much for such a detailed design.

I'd like to identify situations where deadlocks occur so we can fix
them, or confirm they haven't happened at all.

I think your proposal would work, but sounds fairly invasive. I'm
concerned that if we interfere with the main line of processing we'll
just introduce a new set of bugs that won't move us forwards. I would
prefer a "watcher" approach, which doesn't directly interfere with the
main line of processing and can be turned on/off.  Perhaps it isn't
possible?

How about a watcher thread that waits for main thread to respond, if no
response within a timeout it wakes. We then pass information to another
agent which can compare against server-side information and identify
deadlocks. A client/server deadlock detector, rather than within the
driver as I described before.

--
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support


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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: Deadlock detection
Следующее
От: Daniel Migowski
Дата:
Сообщение: Re: Deadlock detection