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 1oprYD-0002G6-Bd for pgsql-docs@arkaria.postgresql.org; Tue, 01 Nov 2022 13:43:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oprYC-0005zS-8R for pgsql-docs@arkaria.postgresql.org; Tue, 01 Nov 2022 13:43:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oprYC-0005zJ-0U for pgsql-docs@lists.postgresql.org; Tue, 01 Nov 2022 13:43:32 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oprY9-00076Y-Er for pgsql-docs@lists.postgresql.org; Tue, 01 Nov 2022 13:43:30 +0000 Received: by mail-wr1-x42b.google.com with SMTP id w14so20133117wru.8 for ; Tue, 01 Nov 2022 06:43:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=pB+/dVPcMBsaf2ZYABJ4GNY5naybJ6j9eRUsvkkt1No=; b=76jOQ0poLjto/SgFtGR4zg+CDAHRHQIWSruY1bKp3MV0snSNhPpOOzP+mFvNh2lcB8 XKm8FGMUn+ig6S/8/B0FT75xeBRllqdqTZ68Krdt+lv53RBkvkDUynD6Zo/2EwCKYyoB zrsj0dBg9ml/Z/bFgTOaUG9khPfFCZ8XVPVufGkwVeCSKbzTmnY6ptQnyRn4FgtCcKGD 1dy9GSxx/DmdzDoUzmOiRKgQTqkqge9KFKNJuYJxbBIWzKro9qUiuZXpuTm58AI9+Yxp U2N15gI4EckhVpDRDGhL5Wv3NSwSAecg66fZCZnXoQhcst1lgdgVQD4u4+qLqYR8XaH8 eXaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=pB+/dVPcMBsaf2ZYABJ4GNY5naybJ6j9eRUsvkkt1No=; b=mxlT01cQP+RMj2Cj4cAVOtlaTF261OX4seLeOAjVmuSCrJf5LA8XzFvRsb1jhFdam8 E7rrjRBSRGO/TQ+M1Hvo57wTiuO3Ttk4KRkH8UYzeMkM0vHLg9t+OorfYao5u9/MRksh KKjf+5yGGLNSppckfFMuFC+aDMOxTei5Jw7I06Rpks756LVzoRX9W2cebAYVzG8pyfCQ BfBa/h9qeQ7WUyGjgttFpqqpYtTQdTJeXV7jvXeva2hIvsNJA0jkFti5cEiBR9y9/iw/ 3FpFPSXnBTMxxFpAZN7Mg1vBPTPfBbSoc7rDvttnjISACjpi6xgrzE311Qy8c284RQ5A 2vUw== X-Gm-Message-State: ACrzQf3PZBmy9txtPRxBOg+C5z4/hN7Cs3PUl6Hyl59anoDALUZavdth 3ENthoEY/RhIDDE+fpYFNmUIkeJdTuZJhA== X-Google-Smtp-Source: AMsMyM4xeRabV63PnIWPL8WAybF1QpTgtsa9TRZhv1Zs3umc2eNM2SgjirREsbG2us7SsscwHjVBfg== X-Received: by 2002:a5d:6da2:0:b0:236:7916:a9b2 with SMTP id u2-20020a5d6da2000000b002367916a9b2mr11768603wrs.393.1667310207935; Tue, 01 Nov 2022 06:43:27 -0700 (PDT) Received: from localhost.localdomain (178-190-182-20.adsl.highway.telekom.at. [178.190.182.20]) by smtp.gmail.com with ESMTPSA id v11-20020a05600c444b00b003c70191f267sm10858898wmn.39.2022.11.01.06.43.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Nov 2022 06:43:27 -0700 (PDT) Message-ID: Subject: Re: Partitioned tables are not processed by autovacuum. From: Laurenz Albe To: rruenroeng@gmail.com, pgsql-docs@lists.postgresql.org Date: Tue, 01 Nov 2022 14:43:27 +0100 In-Reply-To: <166725557839.630.12125626056953515266@wrigleys.postgresql.org> References: <166725557839.630.12125626056953515266@wrigleys.postgresql.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2022-10-31 at 22:32 +0000, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/15/runtime-config-autovacuum.html > Description: > > There is a statement in the Postgres Docs: "Partitioned tables are not > processed by autovacuum." > https://www.postgresql.org/docs/15/routine-vacuuming.html > > What does the above statement mean? > Does autovacuum not process both the parent and the child tables in a > partition relationship? > > What is the definition of a partitioned table? > > I have a table with 50+ million rows that gets data added to/wiped from it > every 90 days. We are planning to break this table into a few thousand > partitions. More partitions will likely be added in the future, but we don't > have plans to delete any of the partitions. Will we need to manually track > the statistics of these partitions and manually vacuum the tables or will > autovacuum help to manage them? > > I found the above statement unclear. I have proposed an improvement here: https://postgr.es/m/1fd81ddc7710a154834030133c6fea41e55c8efb.camel@cybertec.at You could review my patch for the current commitfest: https://commitfest.postgresql.org/40/3963/ The meaning of "partitioning" is defined here: https://www.postgresql.org/docs/current/ddl-partitioning.html You won't have to track the statistics on the partitions, but if you need accurate statistics for the partitioned table itself, you will have to run ANALYZE on it. Yours, Laurenz Albe