Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8BLh-00013O-5w for pgsql-general@arkaria.postgresql.org; Tue, 27 Jul 2021 00:53:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m8BLe-0004Qu-Cb for pgsql-general@arkaria.postgresql.org; Tue, 27 Jul 2021 00:53:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8BLe-0004Qk-3d for pgsql-general@lists.postgresql.org; Tue, 27 Jul 2021 00:53:30 +0000 Received: from mail4.sigmanet.lv ([92.240.72.68]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8BLb-0007gr-84 for pgsql-general@lists.postgresql.org; Tue, 27 Jul 2021 00:53:29 +0000 Received: from online2.sigmanet.lv (unknown [92.240.80.57]) (Authenticated sender: guntiso@latnet.lv) by mail4.sigmanet.lv (Postfix) with ESMTPSA id 6AA67C11D6 for ; Tue, 27 Jul 2021 03:53:25 +0300 (EEST) Received: from r45-65-132-79-broadband.btv.lv ([79.132.65.45]) via online.sigmanet.lv ([92.240.80.53]) by online2.sigmanet.lv with HTTP (HTTP/1.0 POST); Tue, 27 Jul 2021 03:53:25 +0300 MIME-Version: 1.0 Date: Tue, 27 Jul 2021 03:53:25 +0300 From: guntiso@latnet.lv To: pgsql-general@lists.postgresql.org Subject: single-row deadlock User-Agent: SigmaNet webmail Message-ID: <2fcd64476bfaf1ca62f768508325825f@latnet.lv> X-Sender: guntiso@latnet.lv Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -4.86 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, After upgrading from PostgreSQL 9.6 to 13 we started to experience locking issues once per week or two. Replacing exclusive table lock with helper table row lock did not help. Now it seems like a single-row deadlocks can occur, which should not be possible (audit_data_lock table contains one row): blocked_pid,blocking_pid,blocked_statement,current_statement_in_blocking_process,blocked_application,blocking_application 6752,6577,update audit_data_lock set locks_used = locks_used + 1,update audit_data_lock set locks_used = locks_used + 1,PostgreSQL JDBC Driver,PostgreSQL JDBC Driver 6577,6752,update audit_data_lock set locks_used = locks_used + 1,update audit_data_lock set locks_used = locks_used + 1,PostgreSQL JDBC Driver,PostgreSQL JDBC Driver Is this a known issue? It seems like https://postgrespro.com/list/thread-id/1231581. Are there any workarounds?