pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rajesh Kumar <rajeshkumar.dba09@gmail.com>
To: Holger Jakobs <holger@jakobs.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Deadlock
Date: Tue, 2 Apr 2024 22:39:58 +0530
Message-ID: <CAJk5AtbDMDD5HKP796qoNPzKqE4qWgnr-ySE7ErED6ph6ebdtw@mail.gmail.com> (raw)
In-Reply-To: <58661f82-620c-8116-efe7-23266578289c@jakobs.com>
References: <CAJk5Atb6CnsgAJUQ--UPgvRH-eZUhhL__P9-pz=XZsq=r29ShA@mail.gmail.com>
	<58661f82-620c-8116-efe7-23266578289c@jakobs.com>

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
> <https://signal.me/#eu/GpIP259bBne_JiBYJFvbZCLYJELhB-92nJfncACL1LUeBOphfXFFgLYYVXv_AGhg;
>

Attachments:

TapMuhNyQVuzuVPA.png (image/png, 551B) download view image
TapMuhNyQVuzuVPA.png (image/png, 551B) download view image

view thread (9+ messages)  latest in thread

Message-ID: <CAJk5AtbDMDD5HKP796qoNPzKqE4qWgnr-ySE7ErED6ph6ebdtw@mail.gmail.com>
Permalink:  ../CAJk5AtbDMDD5HKP796qoNPzKqE4qWgnr-ySE7ErED6ph6ebdtw@mail.gmail.com/
Also on:    postgresql.org/message-id/CAJk5AtbDMDD5HKP796qoNPzKqE4qWgnr-ySE7ErED6ph6ebdtw@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: rajeshkumar.dba09@gmail.com, holger@jakobs.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Deadlock
  In-Reply-To: <CAJk5AtbDMDD5HKP796qoNPzKqE4qWgnr-ySE7ErED6ph6ebdtw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox