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 1lUywL-0005sQ-7v for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Apr 2021 21:45:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lUywJ-0003Cu-Is for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Apr 2021 21:45:19 +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 1lUywJ-0003Cm-75 for pgsql-hackers@lists.postgresql.org; Fri, 09 Apr 2021 21:45:19 +0000 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lUywC-0004rT-DS for pgsql-hackers@lists.postgresql.org; Fri, 09 Apr 2021 21:45:18 +0000 Received: by mail-il1-x12a.google.com with SMTP id 6so5891335ilt.9 for ; Fri, 09 Apr 2021 14:45:11 -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=iwdlE5Y315U+ifsRx1gJXvnXWdoCYwXiuIAZuyOR2TE=; b=T8KvflDJUISBsmEWS42HpXaqojnr6Y6xyn5OFzIjuryOKC2q8cMzZS9/Jbz0QmiTKf T2AkGzLgRfmKaGDcnDcNxWCiHQbZhY4xWhK5cnGoQfpQPB88hYHOUDLr9GygdTs/mjIn MBYxcMLxNgWJ0tesqCJmsvF7W1hXUjdsWRw5XELcX2K57uYHEOeRiDfW4dA3Ec/3OBXH 5z6BBLKgRueUbdVA1yML2u3OODIKKrSoZO0bVyjqj+T8OxFQwetTi77kBRAiWCEX9rTq wbTkDOUbLriJfbvxqdZd/BSIQgwYOIGC98EOlz1VB6jze9miu2mdOWzmC0Ixo7WmOhxi VOxQ== 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=iwdlE5Y315U+ifsRx1gJXvnXWdoCYwXiuIAZuyOR2TE=; b=a98khRikL5wmXdF00K2ofJaACV0cUvmNF4+f5jypvAmKoYTfhH6GYIhinqRAdfZfFx 4CYDgGJvCVzBPZteI0otV5epVC6dop/2Om4ZhDME7Y8Jeo0haJq345/GhmyG5tuo+YYB nabqnMTQ1IP5D0XuVM1mcCIsoW6UWFOajFanpNzdnrfKM1axi8tWKxjoLxLTTTilT0wv 3vy86OpxsJmWgZbQa+rya9eFrS2JRT+EBygciXYTRN/bKjJICPYZPNVXoY2RsONauRyZ nsTM1EcJ2EpT7AEeLjwej2aViV9IuXxo5SVCzOxjdsm73ol5o1uXTw8JVDpLWfVHd/Ic 6ZEA== X-Gm-Message-State: AOAM533JkoIVjKmsNEcEybZX0JLpZPwlhWWuRPs7I3W7pav0p7ULuhDk byLzagYQL7OcNa3l32OABKRQOg== X-Google-Smtp-Source: ABdhPJyTdbF8/8ICoIOcE29UtdOIGfBXQunokDLP5RZahrtSvM901JlHpLru5BjRcOeGP2qUUEFMeA== X-Received: by 2002:a05:6e02:18ce:: with SMTP id s14mr13270625ilu.195.1618004710469; Fri, 09 Apr 2021 14:45:10 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id y13sm1794456ioc.36.2021.04.09.14.45.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Apr 2021 14:45:09 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id DDF6A802183; Fri, 9 Apr 2021 16:45:08 -0500 (CDT) Date: Fri, 9 Apr 2021 16:45:08 -0500 From: Justin Pryzby To: Alvaro Herrera Cc: Robert Haas , Tom Lane , Zhihong Yu , pgsql-hackers@lists.postgresql.org, Yuzuko Subject: Re: pgsql: autovacuum: handle analyze for partitioned tables Message-ID: <20210409214508.GV6592@telsasoft.com> References: <20210409213155.GA23912@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210409213155.GA23912@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 Fri, Apr 09, 2021 at 05:31:55PM -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.) > > Good question. It does not. I think there's probably cases where this is desirable, and cases where it's undesirable, so I don't think it's necessarily a problem. One data point: we do DETACH/ATTACH tables during normal operation, before type-promoting ALTERs, to avoid worst-case disk use, and to avoid locking the table for a long time. It'd be undesirable (but maybe of no great consequence) to trigger an ALTER when we DETACH them, since we'll re-ATTACH it shortly afterwards. However, I think DROP should be handled ? -- Justin