Обсуждение: Finding deadlocks on postgresql ?

Поиск
Список
Период
Сортировка

Finding deadlocks on postgresql ?

От
Machiel Richards
Дата:
Hi All

       I am trying to find out the following and google doesn't seem to be very helpful today :-(

         As part of creating a Daily health check for  some postgresql databases, I am trying to determine whether the database have any deadlocks.

          I am not sure however how to do this and thus I am hoping someone can assist me here.


        Is there a method to check postgresql for any deadlocks via a query or perhaps other methods?

    I would really appreciate the help here.

Regards
Machiel

Вложения

Re: Finding deadlocks on postgresql ?

От
Edi Stojicevic
Дата:
* Machiel Richards <machielr@rdc.co.za> [2010-08-13 11:36:47 +0200] wrote :

> Hi All
>
>        I am trying to find out the following and google doesn't seem to
> be very helpful today :-(
>
>          As part of creating a Daily health check for  some postgresql
> databases, I am trying to determine whether the database have any
> deadlocks.
>
>           I am not sure however how to do this and thus I am hoping
> someone can assist me here.
>
>
>         Is there a method to check postgresql for any deadlocks via a
> query or perhaps other methods?
>
>     I would really appreciate the help here.
>
> Regards
> Machiel

Hi,

Is there a thing I found in the archives :

http://archives.postgresql.org/pgsql-admin/2006-08/msg00248.php

Regards,
--
 .''`.  Edi Stojicevic
: :'  : Debian GNU/Linux user, admin & developer - http://www.debian.org
`. `~'
  `-
AUTHOR
FvwmAuto just appeared one day, nobody knows how.
        -- FvwmAuto(1x)

Re: Finding deadlocks on postgresql ?

От
Tom Lane
Дата:
Machiel Richards <machielr@rdc.co.za> writes:
>          As part of creating a Daily health check for  some postgresql
> databases, I am trying to determine whether the database have any
> deadlocks.

I'm not sure what you're imagining you need to do here.  Deadlocks are
not persistent conditions in Postgres --- they're detected and one of
the competing transactions is rolled back to remove the deadlock.

            regards, tom lane