public inbox for [email protected]  
help / color / mirror / Atom feed
From: Scott Ribe <[email protected]>
To: Wasim Devale <[email protected]>
Cc: pgsql-admin <[email protected]>
Subject: Re: Dead lock after the migration from CentOS 7 to RHEL 9
Date: Wed, 14 Aug 2024 21:45:29 -0600
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAB5fag47NNn4T1e-t7YkLkqQbdammAvgDeb423ThaY=VjkSTOQ@mail.gmail.com>
References: <CAB5fag444HCM8xONrKbg+rJ5odCdy=0vmianN2Si5K5mWRFKvQ@mail.gmail.com>
	<CAB5fag6QPm1OE7H6roywzovDxb9rT9Wx-MdeiuK=mDvx6NTwtw@mail.gmail.com>
	<CAKFQuwbHt_56dOP-Fjtaj2C9KVJN14-L9LrDUf5AeWyW21g7KQ@mail.gmail.com>
	<CAB5fag7hsyWJUv=KezM=10RZ8hs=3fDkR4vMmJvn-Fjv3O0oeA@mail.gmail.com>
	<CAKFQuwYyFBgKKtJwFAOOsd2NahG6g8ymFKy_KpqhcoHdb_Nd3g@mail.gmail.com>
	<CAB5fag47NNn4T1e-t7YkLkqQbdammAvgDeb423ThaY=VjkSTOQ@mail.gmail.com>

Given errors like the pair you posted, my next step would be to examine the queries being executed by those processes during the deadlock. Now, I think by the time the deadlock error is logged, the queries involved have been cancelled, so it's possible the processes have gone on to another query and so pg_stat_activity might not have useful information, or it might--depending on what your app would do after a deadlock error.

If it does not, then the next thing would be to set log_min_duration_statement to less than deadlock/statement timeout, so that you could look through logs to figure out what are the two queries which are deadlocking against each other.

--
Scott Ribe
[email protected]
https://www.linkedin.com/in/scottribe/



> On Aug 14, 2024, at 9:38 PM, Wasim Devale <[email protected]> wrote:
> 
> Ok thanks for the insights.
> Do we need to do any config changes in the config file?
> We have also configured Datadog agent at operating system level that checks postgresql activity it's has the pgpouncer.d config file that is unchanged after the migration. This might be the possible reason that it is throughing dead lock error. 
> Please through some insights on the above.
> Thanks for the immediate help.
> Regards,
> Wasim 
> 
> On Thu, 15 Aug, 2024, 9:01 am David G. Johnston, <[email protected]> wrote:
> On Wednesday, August 14, 2024, Wasim Devale <[email protected]> wrote:
> So it's not a postgresql issue. It's from the application side correct?
> 
> That’s the assumption.  The vast majority of locks happen because the “application” executed SQL commands.
> 
> David J.






view thread (13+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Dead lock after the migration from CentOS 7 to RHEL 9
  In-Reply-To: <[email protected]>

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

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