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 1m1Y2j-0001UA-Am for pgsql-general@arkaria.postgresql.org; Thu, 08 Jul 2021 17:42: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 1m1Y2i-0005Zp-52 for pgsql-general@arkaria.postgresql.org; Thu, 08 Jul 2021 17:42:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1Y2h-0005Zg-QK for pgsql-general@lists.postgresql.org; Thu, 08 Jul 2021 17:42:31 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1Y2f-0008H0-53 for pgsql-general@lists.postgresql.org; Thu, 08 Jul 2021 17:42:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Bos4LVlTwBAEPI9P3ZDwz9Tug63fqYbFyGl5xstrcBw=; b=rgBMGwPtytqf8s+d42P3jUmeld 1wwFJ3jmbqCj7b+A05rjMMXuT95eQWWnUeCGns8VCbRamy10oUtJbCpAA4nE11lyIdqa3kpE/6RNH uFgyk0xPQ2gxKaQG9mOWVDo838OLa8VX+5JB2B18AX3rPntMkfdmBXnzB75kzjaps+ho=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1m1Y2a-0002vk-Ul; Thu, 08 Jul 2021 19:42:24 +0200 Date: Thu, 8 Jul 2021 19:42:24 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Emiliano Saenz Cc: pgsql-general@lists.postgresql.org Subject: Re: The Curious Case of the Table-Locking UPDATE Query Message-ID: <20210708174224.GA9739@depesz.com> Reply-To: depesz@depesz.com References: <20210706092439.GA6661@depesz.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jul 08, 2021 at 02:35:33PM -0300, Emiliano Saenz wrote: > Attach the files. The pg_locks file doesn't show any access exclusive locks on any table? =$ awk -F, 'NR==1 || $13 == "AccessExclusiveLock"' pg_locks.csv Locktype,Database,Relation,Page,Tuple,Virtualxid,Transactionid,Classid,Objid,Objsubid,Virtualtransaction,Pid,Mode,Granted,Fastpath tuple,248043888,248044255,213071,39,NULL,NULL,NULL,NULL,NULL,198/814,21038,AccessExclusiveLock,f,f tuple,248043888,248044255,213071,39,NULL,NULL,NULL,NULL,NULL,34/90197,21187,AccessExclusiveLock,t,f tuple,248043888,248044255,213071,39,NULL,NULL,NULL,NULL,NULL,132/957,21007,AccessExclusiveLock,f,f As you can see all the AccessExclusive locks are on tuples (rows). Best regards, depesz