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 1lZdMq-0004og-Sr for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Apr 2021 17:43:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZdMp-0005HZ-2A for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Apr 2021 17:43:55 +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 1lZdMo-0005HJ-Ra for pgsql-hackers@lists.postgresql.org; Thu, 22 Apr 2021 17:43:54 +0000 Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lZdMl-0004Dv-AY for pgsql-hackers@lists.postgresql.org; Thu, 22 Apr 2021 17:43:53 +0000 Received: by mail-oi1-x232.google.com with SMTP id k25so46605259oic.4 for ; Thu, 22 Apr 2021 10:43:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-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=G3WbdZUQjzAvvLZ8yLV7s3n/2yydl+GMNzOc5BF8yqs=; b=CqmXCHeuupjyqUCTtjWH3sjCkU0cRhz8PXpLH/W8Ndy6sPZp4aYe1h7FgtHKlGZwHg u2W5xTF9i4mNMZXq4+8y04dWcNVwq7CdIHarBOrceQN2KP76Za65v/WT6asfXijOyfjo WExD1uIkgfvd8nMDtpmnuPOqHlp8YORTlO4P5XQj5j9Ws5BJrQ4Lvg2LKDLxn3vFRWHW Jv10aGTjxt560SS5h68zsOwmRrgFajtrdNl4RAxb/NvOVgkCL4HdxJ8GNmDf//ljwn70 JCZ1K9lEah7tL6yUk2FO7xC6WGxt3mx0Fc9x/Plyq3gAUe8+4bjK2kOR88zw5FO/ySa/ TLYQ== 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=G3WbdZUQjzAvvLZ8yLV7s3n/2yydl+GMNzOc5BF8yqs=; b=nSyhXYJR9kNTO8dvS2iLVRulZuce3I2f44PZqZIx5AxDn3yqBqjx+YLQR7+909ePTy 6ySWPCLl6NbA+yOHGIa2Z96W0eGwL6ErPPrJR7AL9Khl4mJUEoUMJKj5ddJkgfxH71cz uLk/eTtMhs+J3K3tJWXlFQ0HAj11qpzgvtqI0h64TaJp5bzOYYttqM9nrdVSr5weWKDr T37xWPGf4+/iFX683X+JaQXlMJ13OGbxOXAVweXRymOZ3dt7wj9p8BboVOXrRgJ0Yv1A JyXsmQb6oo89g/p8QkK2vHsNzolsD2gzGqyJXUCLj+zboUWSCndo1RDUqnCaJmA4Ik9J iklA== X-Gm-Message-State: AOAM533hLx3vgeqhllxJCmxneIiFE/QJUTKKA9qA9p+ktIXaYSxZGXEi Tg4ViuhfT9UZ0qmfGkjd5tTj/A== X-Google-Smtp-Source: ABdhPJw3fAwJjWGnk6JZ+1GEN+u0+Z3KFPnlyGGBUcwn1fFB9CGddu9t9JpTn9d1BRljLIUq/nlSmQ== X-Received: by 2002:aca:dc87:: with SMTP id t129mr787894oig.137.1619113429040; Thu, 22 Apr 2021 10:43:49 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id d7sm696586oib.49.2021.04.22.10.43.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Apr 2021 10:43:48 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 1D0C08009E1; Thu, 22 Apr 2021 12:43:47 -0500 (CDT) Date: Thu, 22 Apr 2021 12:43:46 -0500 From: Justin Pryzby To: Alvaro Herrera Cc: Robert Haas , Tom Lane , Zhihong Yu , pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: autovacuum: handle analyze for partitioned tables Message-ID: <20210422174346.GE7256@telsasoft.com> References: <20210421230649.GA19244@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210421230649.GA19244@alvherre.pgsql> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Apr 21, 2021 at 07:06:49PM -0400, Alvaro Herrera wrote: > On 2021-Apr-09, Robert Haas wrote: > > Does this need to worry about new partitions getting attached to a > > partitioned table, or old ones getting detached? (Maybe it does > > already, not sure.) > > I was pinged because this is listed as an open item. I don't think it > is one. Handling ATTACH/DETACH/DROP is important for overall > consistency, of course, so we should do it eventually, but the fact that > autovacuum runs analyze *at all* for partitioned tables is an enormous > step forward from it not doing so. I think we should treat ATTACH/ > DETACH/DROP handling as a further feature to be added in a future > release, not an open item to be fixed in the current one. I think this is okay, with the caveat that we'd be changing the behavior (again) in a future release, rather than doing it all in v14. Maybe the behavior should be documented, though. Actually, I thought the pre-existing (non)behavior of autoanalyze would've been documented, and we'd now update that. All I can find is this: https://www.postgresql.org/docs/current/sql-analyze.html |The autovacuum daemon, however, will only consider inserts or updates on the |parent table itself when deciding whether to trigger an automatic analyze for |that table I think that should probably have been written down somewhere other than for the manual ANALYZE command, but in any case it seems to be outdated now. -- Justin