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 1qnaYn-00BMrP-OQ for pgsql-general@arkaria.postgresql.org; Tue, 03 Oct 2023 08:15:17 +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 1qnaYl-002Vkz-Vt for pgsql-general@arkaria.postgresql.org; Tue, 03 Oct 2023 08:15:16 +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 1qnHGe-00Et7B-5W for pgsql-general@lists.postgresql.org; Mon, 02 Oct 2023 11:39:16 +0000 Received: from ssl.schlittermann.de ([46.38.236.101]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qnHGb-007mFI-8G for pgsql-general@lists.postgresql.org; Mon, 02 Oct 2023 11:39:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=schlittermann.de; s=dd201504; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:To:Subject:MIME-Version:Date:Message-ID:Cc: Content-Description:Content-ID:Resent-Cc:Resent-To; bh=NOrceQRQzNQGe/yZIj2s/JKsdJHzreuAY83x/Mb3uKs=; b=A03OkrVXyMiLU935u1mGC61TAz yqxsV0kVJQsG06ND0qtiQ7dKJdkvF2jUbWNF4VF1mW6Zqsddsm9GBbUlQoeInV6ZE1+QQONpOkpzl GWrfOv3M6xdWaRmp0B6OBAcDAfwnpCmtIrKYQnMXPijA2HhnW+4kKoPV4Pcx3IVfLtFE=; Received: by ssl.schlittermann.de with esmtpsa (TLS1.3:TLS_AES_128_GCM_SHA256:128) (Exim 4.x) (envelope-from ) id 1qnHGZ-0027we-Tc for pgsql-general@lists.postgresql.org; Mon, 02 Oct 2023 13:39:11 +0200 Message-ID: <20c3aadc-e589-c601-c2a7-0ca89a7cec66@a-kretschmer.de> Date: Mon, 2 Oct 2023 13:39:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: How to investigate deadlocks Content-Language: en-US To: pgsql-general@lists.postgresql.org References: From: Andreas Kretschmer In-Reply-To: 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 Am 02.10.23 um 13:27 schrieb Matthias Apitz: > Hello, > > One of our clients running our LMS on top of PostgreSQL 13.1 created a > ticket with these messages: > > 2023-09-30 16:50:50.951 CEST [18117] ERROR: deadlock detected > 2023-09-30 16:50:50.951 CEST [18117] DETAIL: Process 18117 waits for ShareLock on transaction 150396154; blocked by process 18187. > Process 18187 waits for ShareLock on transaction 150396155; blocked by process 18117. > Process 18117: fetch hc_d03geb > Process 18187: fetch hc_d02ben > 2023-09-30 16:50:50.951 CEST [18117] HINT: See server log for query details. > 2023-09-30 16:50:50.951 CEST [18117] CONTEXT: while locking tuple (38,57) in relation "d03geb" > 2023-09-30 16:50:50.951 CEST [18117] STATEMENT: fetch hc_d03geb > > The shown PIDs for sure are the ones of the Pos backend proc (on Linux). > Is there any chance to investigate it further? please also check https://www.cybertec-postgresql.com/en/postgresql-understanding-deadlocks/ Andreas -- Andreas Kretschmer Technical Account Manager (TAM) www.enterprisedb.com