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.92) (envelope-from ) id 1jENpf-0000wh-Fb for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Mar 2020 01:49:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jENpe-0003AT-4Y for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Mar 2020 01:49:18 +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 1jENpd-0003AM-SE for pgsql-hackers@lists.postgresql.org; Wed, 18 Mar 2020 01:49:17 +0000 Received: from mail-qv1-xf44.google.com ([2607:f8b0:4864:20::f44]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jENpa-0004Ff-Jh for pgsql-hackers@lists.postgresql.org; Wed, 18 Mar 2020 01:49:17 +0000 Received: by mail-qv1-xf44.google.com with SMTP id o18so12063171qvf.1 for ; Tue, 17 Mar 2020 18:49:14 -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:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=32NTT6553xtr7DU83L+aR8yKwT1nCuHzy5SPcakqk/U=; b=wRgNBUzizPhw4vusZ5+XU0d/6HEBv8ptoqqw6BFgR1z91wk/IwiY46UHa6Jcv945tI 4nFXakjcGH/tqpB1IYMH8xU1DDAfcEvm3eUpfC7pF1YT2MofucBs6Qymd+ISh74c7WPW xNLH7KaiC6m1kH697E0OWW2WXDatiSeL6/Q+H5Wv9PFzYGe5poBiZFPLbBruM5Fq+yJY 2kTxcVVLSG8rjiihtukg5bTN4UCNAMlxxNkC4/Ycot+NVE4+wJ8sBl+s6HTXTVR92mY3 Sfp8pa3I3pAuz8ts1qupmIcq6AxJNfuh6KPJSDe2NvFcRLU7EbhP0K1A2jxBuebpGD0t iYTg== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=32NTT6553xtr7DU83L+aR8yKwT1nCuHzy5SPcakqk/U=; b=mMrRWYE56QsV92fP2kcWVRazhze0bsnItp0eHK85O3xLvkSzLEvQB76kGjab5CDLxl 4l+LV5GtKECN9IeTHW2eEnnMYTO1mjjbsTbw8UnJVojZvxNXvIlOJ/9+I53RPgXYNTGh kPumdbewnrvsJrTrhNUtYoMGH50kWLs1k109uKA8PrcRTOGq+7QJId6RDPSWAfRpg7oS cLU1t9QzoUETyaSGXnmXNj3o9ofRQL++O8gkvchV/4pNdRa+j3qIQomN1g5ScWDqSbBK 3bRW5vK3KCX0WW7EcNnuzvkLt82GUeQlODfiV5JQ+eHmPW5HTWEXxEMo5heAJpo3dWG+ AxRg== X-Gm-Message-State: ANhLgQ0it2hz9TL+/EEDQyGb9GtPHu/42+Uha+vYH+FjF47ia4ff+xof BD8IUdq6RnolxFoX3BwJ9g0gYQ== X-Google-Smtp-Source: ADFU+vvGj3K89qT+58Vf7nme1kIdNuXiyYQ+3BpAjzLOlJH6QhvdHtz5xQEi9b1e2uw1RTRkq3CJTA== X-Received: by 2002:ad4:500c:: with SMTP id s12mr2134775qvo.138.1584496153108; Tue, 17 Mar 2020 18:49:13 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([179.56.51.165]) by smtp.gmail.com with ESMTPSA id r3sm3307535qkd.3.2020.03.17.18.49.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Mar 2020 18:49:12 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 6CFF73007EA; Tue, 17 Mar 2020 22:49:10 -0300 (-03) Date: Tue, 17 Mar 2020 22:49:10 -0300 From: Alvaro Herrera To: yuzuko Cc: Amit Langote , Masahiko Sawada , Laurenz Albe , PostgreSQL Hackers , Greg Stark Subject: Re: Autovacuum on partitioned table Message-ID: <20200318014910.GA19400@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Mar-18, yuzuko wrote: > > I think if we analyze partition tree in order from leaf partitions > > to root table, this problem can be fixed. > > What do you think about it? > > Attach the new patch fixes the above problem. Thanks for the new version. I'm confused about some error messages in the regression test when a column is mentioned twice, that changed from mentioning the table named in the vacuum command, to mentioning the first partition. Is that because you changed an lappend() to lcons()? I think you do this so that the counters accumulate for the topmost parent that will be processed at the end. I'm not sure I like that too much ... I think that needs more thought. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services