Re: Dead lock after the migration from CentOS 7 to RHEL 9 - Mailing list pgsql-admin

From Tom Lane
Subject Re: Dead lock after the migration from CentOS 7 to RHEL 9
Date
Msg-id 383012.1723694908@sss.pgh.pa.us
Whole thread Raw
In response to Re: Dead lock after the migration from CentOS 7 to RHEL 9  (Scott Ribe <scott_ribe@elevated-dev.com>)
List pgsql-admin
Scott Ribe <scott_ribe@elevated-dev.com> writes:
> Given errors like the pair you posted, my next step would be to examine the queries being executed by those processes
duringthe deadlock. Now, I think by the time the deadlock error is logged, the queries involved have been cancelled, so
it'spossible the processes have gone on to another query and so pg_stat_activity might not have useful information, or
itmight--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.

The postmaster log should already contain the statements that
deadlocked against each other --- that's what the "HINT: See server
log for query details" is telling you.

            regards, tom lane



pgsql-admin by date:

Previous
From: Wasim Devale
Date:
Subject: Re: Dead lock after the migration from CentOS 7 to RHEL 9
Next
From: Asad Ali
Date:
Subject: Re: Dead lock after the migration from CentOS 7 to RHEL 9