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 1hsWb9-0004jl-IW for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jul 2019 18:11:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hsWb8-0006U0-Fe for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jul 2019 18:11:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hsWb8-0006Tt-3L for pgsql-hackers@lists.postgresql.org; Tue, 30 Jul 2019 18:11:42 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hsWb4-0007VZ-Rb for pgsql-hackers@postgresql.org; Tue, 30 Jul 2019 18:11:41 +0000 Received: by mail-wr1-x444.google.com with SMTP id n9so41711622wrr.4 for ; Tue, 30 Jul 2019 11:11:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=t1/uIbpHI4ssMyQfA26YaOInSpPaGxXPE38pU9JUeV8=; b=JDz7+pDnTrBRNdR3dM7hfqubfvR5RmUbabrc2eb9UYxaRBWEx916lkyNoDfQ2l3aHD neDOsx63W2lT9H0Y2q5TW/m59Obw9+KXkprJxYt49RT+U8cczyQ3k3SUnPRVIt7qir2q E8a+oXNVkATti6dFL9DoCoTT34hp9aQ2q/j0V+5QCXda2xlQ32QveXMHZH/RqQN+8VHb fs/uyXj2QnVwNkBydjLTVDqhqnZ0Itp939rm3qpgdgrxcyqbhMX/CdA5kn+ZCwxDGJgr QGr+GIy9+HIqfmRXcn+2RXc982e9e/Onilr7nKMv10M6atH1xG1BFxmeZRYhm5CnloZm eqXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=t1/uIbpHI4ssMyQfA26YaOInSpPaGxXPE38pU9JUeV8=; b=haqZY+BS/hAvJ4vZLgX8Nq58sSr9NekZG3Fi6wlQ9ghUISF3+EuJND220agyI1tDPE HHxeGW367Bj/G9jlcGjI9DISkTu/Eq15EbXd3t5bBamXMn5PeNe4Ny4fmperDBYoN21O 9hChlsgCKWjb1GU/4r05nOENPklARyBn9KbUv78Zwz8RVZLVUwjPbXp+XhDGn74QCbRS 8yWyy42qK8SV9s+k6eVx9HAB3Odj8L/cvO21OWlSH0UHajhCeiklJzM31UdEaCoWqE+z 7yE/r1BvMQKJUaCZXgf5E6YQvKbJReU8GdHWeETVNtjMgf3Xugi0obJZTO1GXxrwnVZB YbKA== X-Gm-Message-State: APjAAAUOiLf8oFRxYQqi5p+b/co/B8+3xodzFIq70zs927jkbu9HBGdn 8F5JRb3FDcDffZTWFRL6yAaXIQ== X-Google-Smtp-Source: APXvYqwsyP7qig8cEGCLsS6y4/m1T7uDbJo+DOUjAbKsfMJYoJFLPnRF/uj4mBntuHyH2hvVa96vYg== X-Received: by 2002:adf:f348:: with SMTP id e8mr28315466wrp.76.1564510296472; Tue, 30 Jul 2019 11:11:36 -0700 (PDT) Received: from localhost (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id f1sm44783901wml.28.2019.07.30.11.11.35 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 11:11:35 -0700 (PDT) Date: Tue, 30 Jul 2019 20:11:34 +0200 From: Tomas Vondra To: Andres Freund Cc: Justin Pryzby , Tomas Vondra , Dean Rasheed , pgsql-hackers@postgresql.org Subject: Re: ANALYZE: ERROR: tuple already updated by self Message-ID: <20190730181134.3d6t6yd6rnmoeuv3@development> References: <20190618231233.GA27470@telsasoft.com> <20190618234858.GK16019@telsasoft.com> <20190619000837.awy6j7h45ahd4vop@alap3.anarazel.de> <20190723200127.moumhmj3z4b4dohg@alap3.anarazel.de> <20190728101520.da5nptiftmsnmv7c@development> <20190728164244.44eskwbamhlj6umf@alap3.anarazel.de> <20190728192151.wktk6htdixsjpt6x@development> <20190729045320.ffwc7seez6nbmfaj@alap3.anarazel.de> <20190729101833.rw7imcmggcusbyu6@development> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190729101833.rw7imcmggcusbyu6@development> User-Agent: NeoMutt/20180716-1444-295967-dirty List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Jul 29, 2019 at 12:18:33PM +0200, Tomas Vondra wrote: >On Sun, Jul 28, 2019 at 09:53:20PM -0700, Andres Freund wrote: >>Hi, >> >>On 2019-07-28 21:21:51 +0200, Tomas Vondra wrote: >>>AFAICS it applies to 10+ versions, because that's where extended stats >>>were introduced. We certainly can't mess with catalogs there, so this is >>>about the only backpatchable fix I can think of. >> >>AFAIU the inh version wouldn't be used anyway, and this has never >>worked. So I think it's imo fine to fix it that way for < master. For >>master we should have something better, even if perhaps not immediately. >> > >Agreed. I'll get the simple fix committed soon, and put a TODO on my >list for pg13. > I've pushed the simple fix - I've actually simplified it a bit further by simply not calling the BuildRelationExtStatistics() at all when inh=true, instead of passing the flag to BuildRelationExtStatistics() and making the decision there. The function is part of public API, so this would be an ABI break (although it's unlikely anyone else is calling the function). regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services