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 1uqYeS-008Sto-Mn for pgsql-general@arkaria.postgresql.org; Mon, 25 Aug 2025 14:58:30 +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 1uqYeS-00AKYx-4u for pgsql-general@arkaria.postgresql.org; Mon, 25 Aug 2025 14:58:28 +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 1uqYeR-00AKVs-5u for pgsql-general@lists.postgresql.org; Mon, 25 Aug 2025 14:58:28 +0000 Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uqYeP-001g0r-0T for pgsql-general@lists.postgresql.org; Mon, 25 Aug 2025 14:58:26 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id BDC33EC035F; Mon, 25 Aug 2025 10:58:24 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Mon, 25 Aug 2025 10:58:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1756133904; x=1756220304; bh=QsR3uhbT9zvHbNYcXD9Q5v0VS5oRCOQHSouyjEiDaAo=; b= QBs75bTygZjMKfiV6edUl4NnXabVjQD4g1FcRrBf6cd9jx3bXVK8JuZmozo6pGR7 52gGeD8cDzfbgY8qRWZc1JSq22DvGexuNF9VYxKLlLq6XMr4+7OlV5wfuxlKlPPw 5I8YCByLdUFFlJe0Fcxdp2dxWkwkUFB+3mg9l5fL4M24zIpeEpuEliiQY19bkanx Amc6FuOGvy4pEZpLvrPqhzv/SP1A2lge0AYL9V4h9SP1gpwjDdwizP2mL8QskXqC rNEpD0ezYW/39fLrUL8Qsx4xXpkbLj0rMRtpdpJEXg/1xG1FMgt+nNnM6UdPTocX vKeT+CPQ/o3PjBzL1kI8rw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1756133904; x=1756220304; bh=Q sR3uhbT9zvHbNYcXD9Q5v0VS5oRCOQHSouyjEiDaAo=; b=d/dQO6onFwAw0z4+S x6NyYEn75ER14Cs4GxJJw7pYw6MYPDyx105YTdSlfB3BAPFDhQbT0vwp70/iYkYT BbeffEvbPbmSepv+gZ69Rr19xhTGq3prCUdf58ceC49PeyytlWIHF4WBLbT7mMPU i95erpKYo3nVj4H29V0Y84NYJxTvKDav1xlvvX/fduzbSaKHk90jCjqJswG/qy0l Icx50xNidv/kxMsXlgjbnh1YwOz8R1sns3oq/c3AfB3nb9fvtc2OUPa0WWRnw01m /c5KDvZmoMdc0Ensc2ozDRr1PQbEmLMH3o7iM4ZFYLT99fzY/2Sv/wEOAnPsfKzw fBcWA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddujedvieekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeenucfhrhhomheptegurhhirghn ucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmqe enucggtffrrghtthgvrhhnpeeivdfhieehheegueeileejieettdejhedugeefleekvdel keehtdfgiefffeekudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsggp rhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrrdhmrghnth iiihhoshestghlohhuugdrghgrthgvfigrhihnvghtrdgtohhmpdhrtghpthhtohepphhg shhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Aug 2025 10:58:24 -0400 (EDT) Message-ID: <34cc0d5c-4128-4664-9166-acbba9cdf57f@aklaver.com> Date: Mon, 25 Aug 2025 07:58:23 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Strange deadlock with object/target of lock : transaction To: Achilleas Mantzios , pgsql-general@lists.postgresql.org References: <0c474bc1-e7d6-4d7f-88ad-5284f89c997b@cloud.gatewaynet.com> <48a32f45-57f2-4560-ae94-3488b3568c8a@cloud.gatewaynet.com> <1fff675a-61a7-4ad7-8871-7ae7f5bb7ac7@cloud.gatewaynet.com> <01f1e49c-50ac-4aa8-9b82-b73fddbda8ef@cloud.gatewaynet.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: <01f1e49c-50ac-4aa8-9b82-b73fddbda8ef@cloud.gatewaynet.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/25/25 07:40, Achilleas Mantzios wrote: > On 8/20/25 14:59, Achilleas Mantzios wrote: > >> On 8/14/25 16:01, Achilleas Mantzios wrote: >> >>> Hi Adrian >>> >>> On 8/14/25 15:39, Adrian Klaver wrote: >>> >>>> On 8/14/25 00:07, Achilleas Mantzios wrote: >>>>> Hi All >>>>> >>>>> We've been hit by a weird deadlock which it took me some days to >>>>> isolate and replicate. It does not have to do with order of updates >>>>> or any explicit TABLE-level locking, the objects/targets of the >>>>> deadlock in question are transactions. >>>> >>> First off, I maybe wrong with the above conclusion, I noticed that > Hi I reproduced without the triggers, I understood the problem, I > believe the system's behavior is the intended, I am sorry for the false > alarm. The thing is that it takes >=3 transactions to happen . That was > the tricky part, up to now in all cases of deadlocks we had two > transactions involved, this one needed three or more. For folks that run across this thread what was the issue? -- Adrian Klaver adrian.klaver@aklaver.com