Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1seRQq-007A5z-Fk for pgsql-admin@arkaria.postgresql.org; Thu, 15 Aug 2024 03:45:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1seRQp-00EK7u-1I for pgsql-admin@arkaria.postgresql.org; Thu, 15 Aug 2024 03:45:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1seRQo-00EK7m-Jq for pgsql-admin@lists.postgresql.org; Thu, 15 Aug 2024 03:45:46 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1seRQl-004nku-Im for pgsql-admin@postgresql.org; Thu, 15 Aug 2024 03:45:45 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 2DC846214D; Thu, 15 Aug 2024 03:45:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elevated-dev.com; s=easymail; t=1723693541; bh=8XqceKRZbP3D6acYN5D8W7Vh/5NIfn/8kJAICYtDM/o=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=wOUaWQsuf6fU6+pU6r7f+tJRob/sOaO2EFW6PSxJl0XmOIbxPV+3w2kg9EncOuQwY o/eDCuoBQjBkCZyBr63BbibMVKYNqMs0E+9WJzxndnmiAEL664Mrj681mSgeUzKRik OXq+g2Nw+Y+ti9QQoSJ4xpM/J/wAq9kXUxizrkkH/TNKy6zIjlt0JJtcOg+q65ux6E KNADdkVLPgmYEetOiUgYS/bEiJAWB8H4V9ga/aIu9ZfmJHAa15xPPYxr7elp23zRzL Khk3Tj/5K0wztz+GkoiYuahkDFQ5bNuy3liZsMf56SPlcf2bHlCQEuP8LWl2oFzq6l 9i1ktqkDTWGaQ== X-Virus-Scanned: Debian amavisd-new at emo07-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo07-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eVGKXsvVCq0Q; Thu, 15 Aug 2024 03:45:40 +0000 (UTC) Received: from smtpclient.apple (unknown [165.140.184.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 9185B620EE; Thu, 15 Aug 2024 03:45:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elevated-dev.com; s=easymail; t=1723693540; bh=8XqceKRZbP3D6acYN5D8W7Vh/5NIfn/8kJAICYtDM/o=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=GFVSzBX4/xaf/zj9HC9p6l0tNmiVlFT5oyHCaIk5q4xFW7+XYCuquumzLjH4vdDwa Or4dFUydLZQFVYJP9TV/B9B/3xIwsi4RrAtUl+6aoCW2YkmA52S3YjJzajSguR7Y8L BwyWKoklWF/JM+7s+s/NOqZsIyh735AWLFe6FcOZizB7iW6+HiwkfASarFQWpRP99p r5h2cvt92VRPElCY+OwPxc+y6y3ZXPvHwrYk+AAaFPijbhPAiXaOCVfGtokqDVSo8Z 7EMxXlpFaasDr7v559nPZHR9fEQac7o6ieYqXBv3T+v5Mf/EZMjcc3kpbblFJFLdXs BglVsX9JvueWg== Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: Dead lock after the migration from CentOS 7 to RHEL 9 From: Scott Ribe In-Reply-To: Date: Wed, 14 Aug 2024 21:45:29 -0600 Cc: pgsql-admin Content-Transfer-Encoding: quoted-printable Message-Id: <07994165-F268-41E0-9975-4FB5DE2EBED1@elevated-dev.com> References: To: Wasim Devale X-Mailer: Apple Mail (2.3774.600.62) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 scott_ribe@elevated-dev.com https://www.linkedin.com/in/scottribe/ > On Aug 14, 2024, at 9:38=E2=80=AFPM, Wasim Devale = wrote: >=20 > 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.=20 > Please through some insights on the above. > Thanks for the immediate help. > Regards, > Wasim=20 >=20 > On Thu, 15 Aug, 2024, 9:01=E2=80=AFam David G. Johnston, = wrote: > On Wednesday, August 14, 2024, Wasim Devale = wrote: > So it's not a postgresql issue. It's from the application side = correct? >=20 > That=E2=80=99s the assumption. The vast majority of locks happen = because the =E2=80=9Capplication=E2=80=9D executed SQL commands. >=20 > David J.