Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hdOHf-0003EQ-VW for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Jun 2019 00:17:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hdOHe-00024C-Ju for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Jun 2019 00:17:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hdOHe-0001zW-8P for pgsql-hackers@lists.postgresql.org; Wed, 19 Jun 2019 00:17:02 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hdOHc-0002GX-2b for pgsql-hackers@postgresql.org; Wed, 19 Jun 2019 00:17:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x5J0Gorj030100; Tue, 18 Jun 2019 20:16:50 -0400 From: Tom Lane To: Andres Freund cc: Justin Pryzby , Tomas Vondra , Dean Rasheed , pgsql-hackers@postgresql.org Subject: Re: ANALYZE: ERROR: tuple already updated by self In-reply-to: <20190619000837.awy6j7h45ahd4vop@alap3.anarazel.de> References: <20190618231233.GA27470@telsasoft.com> <20190618234858.GK16019@telsasoft.com> <20190619000837.awy6j7h45ahd4vop@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 18 Jun 2019 17:08:37 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30098.1560903410.1@sss.pgh.pa.us> Date: Tue, 18 Jun 2019 20:16:50 -0400 Message-ID: <30099.1560903410@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > I think the problem is pretty plainly that for inheritance tables we'll > try to store extended statistics twice. And thus end up updating the > same row twice. They shouldn't be the same row though. If we're to try to capture ext-stats on inheritance trees --- and I think that's likely a good idea --- then we need a bool corresponding to pg_statistic's stainherit as part of pg_statistic_ext's primary key. Since there is no such bool there now, and I assume that nobody wants yet another pg_statistic_ext-driven catversion bump for v12, the only fix is to get the stats machinery to not compute or store such stats. For now. But I think we ought to change that in v13. regards, tom lane