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 1kXqrh-0004Ec-Ie for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Oct 2020 19:12:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kXqrg-0004dL-Ag for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Oct 2020 19:12:08 +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 1kXqrg-0004d7-3x for pgsql-hackers@lists.postgresql.org; Wed, 28 Oct 2020 19:12:08 +0000 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kXqrd-0004an-E8 for pgsql-hackers@lists.postgresql.org; Wed, 28 Oct 2020 19:12:07 +0000 Received: by mail-ed1-x544.google.com with SMTP id x1so641073eds.1 for ; Wed, 28 Oct 2020 12:12:05 -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; bh=sDpnUfvuMyqOMirdFOzZGJIs9DEfWiiLCG70BHqNFpo=; b=td4UB9uyWZspz8A2u0U6WL0OcDmC09IpXWqe/z+M2JzgAbG1xwGtGn/O0f09/uuKjK hLaHg0vXByrvVFM4bWsyS8y4mIZKFjUTfuhMfWa8jkRKR4LlMGoMgtJh6caRwVqpyRkg yu5mWDad050Zs9yKhQ2jsGCYwPFOQPoFutzeSkx+GBFrvoMTdsu+hERjOjGueqKonAgp cgbVpM1Pd2EEMViQp6ZOv/seQyTqDQFtO36vWNwvo3yvdVnTKKv6pGyijS8nZo7vwXhj BePaIqAKITbcJXaWN6DWlvFUizwDra2d76VbBdVH0ztIEWn/1c/e9kUKR8j1Uw4jKvxZ uD6g== 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; bh=sDpnUfvuMyqOMirdFOzZGJIs9DEfWiiLCG70BHqNFpo=; b=cLKKf3TALA2D8S8fpAcWip4P5K8cxoWMpYQsF5jSGzvSSTz1m1AQXrWChyv99sYIP4 a9BSfzGcMmk4j2AFyAvz9Gti3WQ9Jmx5cDrnQEK0E6kNP7cpokKiC3mulqQ8oA3A7YzI W7rFGEwvofgukas+ySH40ziiZkDNrkHVuN/XKLizyXf0NEzSdjMxtEXhRITRLG9+wpQp d/OB9qfEACkDTaEoRGLclUellrdAWgK54G3qs2RFfWeuTx0bXULG+KDnd0qiokJkf42I RyoqWJG/fL3qM9J345OKNIMSbLxCz9Td6EDd2QRz3fzW2RLhLxFcYkpo5mWEI3Au7Zix ySww== X-Gm-Message-State: AOAM531HOxga9qaYvHJrhQcuDb2pr6/fx2FOSLyYvXnjwZyQFLxAf6KM lxh6sEPRNGdw/faiSk7BOVRldQ== X-Google-Smtp-Source: ABdhPJwj861z7mBq4dtcQIQ/B0/JnshdBf7nNXIIocl0HvXZUSpeXhDrdYmKNGULWXvHNRub9xojoA== X-Received: by 2002:a50:eb0a:: with SMTP id y10mr415150edp.342.1603912324536; Wed, 28 Oct 2020 12:12:04 -0700 (PDT) Received: from localhost (ip-86-49-245-76.net.upcbroadband.cz. [86.49.245.76]) by smtp.gmail.com with ESMTPSA id j3sm316936edh.25.2020.10.28.12.12.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 12:12:04 -0700 (PDT) Date: Wed, 28 Oct 2020 20:12:01 +0100 From: Tomas Vondra To: "David G. Johnston" Cc: =?utf-8?B?RmFicsOtemlv?= Mello , PostgreSQL Hackers Subject: Re: Add important info about ANALYZE after create Functional Index Message-ID: <20201028191201.wh5ldvhsiqy2vknu@development> References: <20201028185538.fzux2lhim472h46o@development> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Oct 28, 2020 at 12:00:54PM -0700, David G. Johnston wrote: >On Wed, Oct 28, 2020 at 11:55 AM Tomas Vondra >wrote: > >> I agree the lack of stats may be quite annoying and cause issues, but my >> guess is the chances of backpatching such change are about 0.000001%. We >> have a usable 'workaround' for this - manual analyze. >> > >My guess is that it wouldn't be too difficult to write a patch that could >be safely back-patched and it's worth doing so even if ultimately the >decision is not to. But then again the patch writer isn't going to be me. > >Given how simple the manual workaround is not having it be manual seems >like it would be safe and straight-forward to implement. > Maybe, but I wouldn't be surprised if it was actually a bit trickier in practice, particularly for the CONCURRENTLY case. But I haven't tried. Anyway, I think there's an agreement it'd be valuable to do this after CREATE INDEX in the future, so if someone wants to implement it that'd be great. We can consider backpatching only once we have an actual patch anyway. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services