Re: Deadlock

Поиск
Список
Период
Сортировка
От Rajesh Kumar
Тема Re: Deadlock
Дата
Msg-id CAJk5AtaxXj2qVrvs5dZH_areUM70ANyJhJQesZYduyhOVY=BPg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Deadlock  (Holger Jakobs <holger@jakobs.com>)
Ответы Re: Deadlock  (Dan Smith <j.daniel.smith1@gmail.com>)
Список pgsql-admin
Ok, do u mean to say that we do not have to do anything if I see an error in log for deadlock lock?



On Tue, 2 Apr 2024, 23:12 Holger Jakobs, <holger@jakobs.com> wrote:


Am 02.04.24 um 19:09 schrieb Rajesh Kumar:
Yes, I am trying to find out what message i should reply if I receive email with deadlock notification.

I understand how deadlock occurs, hot to find them in logs, prevention of deadlock(ex: oqueries in order) etc.

But since the deadlock_timeout is 1s, they don't probably hang around. So post getting an alert, not sure what to respond to them

On Tue, 2 Apr 2024, 22:15 Holger Jakobs, <holger@jakobs.com> wrote:
Am 02.04.24 um 18:40 schrieb Rajesh Kumar:
Hi

If I receive an alert for deadlock, what should I do? Like what analysis should I do? No way to find a root cause?
Under pg_locks, what I can analyse? 

If you receive an error with a deadlock, the current transaction is dead. You have to decide whether to try again.

Within the error message you find a hint which other (not aborted) transaction was involved in the deadlock. So you have all the information you need to find the culprit.

Regards,

Holger

--

Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012

chat with me on Signal messenger

I wonder what you are writing about. A database doesn't send email notifications. That must be a feature of some application.

So you will have to deal the the application code or its developers.

Or is it a customer sending you a message that some deadlock happened on their system? Still, you have to deal with the application code or the log files of the database system.

Regards,
Holger

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

Предыдущее
От: Holger Jakobs
Дата:
Сообщение: Re: Deadlock
Следующее
От: Dan Smith
Дата:
Сообщение: Re: Deadlock