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 1pAds5-00059d-Kq for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Dec 2022 21:21:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pAds4-0001Gz-Hp for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Dec 2022 21:21:56 +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 1pAds4-0001Gq-79 for pgsql-hackers@lists.postgresql.org; Wed, 28 Dec 2022 21:21:56 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pAds1-0002zg-Tg for pgsql-hackers@lists.postgresql.org; Wed, 28 Dec 2022 21:21:55 +0000 Received: by mail-pj1-x102a.google.com with SMTP id gv5-20020a17090b11c500b00223f01c73c3so17104045pjb.0 for ; Wed, 28 Dec 2022 13:21:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=C5wnqUfZ7+SXgYUWmEPOB3heot5Q5Mh6NRO0mLWKN5A=; b=ofJaP++mh1TR2X87FmkBHPevSJAdh5thD2oy+ylYfx+qWdQOGMeA/Fm9OpcfN995Ev KUVXN6JLfww/oK7CRvoHIRdusTTGuwHNtGIAgncxkSEk7Me5xI0egbYmWNOVZX5eDWEi mNwdjrqQd0EX11sIwLfGZrqw5vQdVfOkhLvhAaSXQjgCxSegvdhU63QFAe5cMgasuJ6h GGzJGwJ+VcN3VU2GQSRjjWlX76MtoRrw7YqZUBzRIHBpBoj+ezxzkM3+cRgoRjBXxYja RRabf+iIUxvAKs5G/oP+xvkwtW8SknSsMmBo9W5WB8xRJHAfTZgQ/maw99Yxzs55AXEj d1uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=C5wnqUfZ7+SXgYUWmEPOB3heot5Q5Mh6NRO0mLWKN5A=; b=0SBq1wW0Qxh06E1dXNKBE1w0UlY9kk+aiwl9bOBHOw/YtILCi73zfTNBfDwPG2uicP WDFUDgfGfopuuhNLH46SVfBP1LejKMMctW1nuzV4XW5pSIAQ1uArPD2lSX2DMSlYj1Wy 78vEvamkXbZsm1sXMzATKFGfspIVKt9eJmVc3kN7bcYqy3NP2hNb78GXgZ3qGdeqWJiA l67VDzctV9w62sc9kJCli2N+L+rWh8rSCaS54awpBZlnb7+lAcRNkqwgd8ZZUxluvAZb dVCGFwR2g+VmTjByUy8KjFPZmfpf1sLmiU6LYzU6BihNfMqtysGVZ20PDQx8CrSMtR3J aujg== X-Gm-Message-State: AFqh2kp3VFAKFnzbPKjO3yqKF15lcro5wls2ky517PzMMqci5Jq7BinX CGyC0MuK3gz6Au4tzfJgbOYSe9qrIR0= X-Google-Smtp-Source: AMrXdXubY863B+K4V8P/5GOFQOJcaIiwNkxAdoVKGBtZzwGrARe8+vy1mzAAuiA16zyl5/YlpQnJeg== X-Received: by 2002:a17:90b:601:b0:20d:bd5f:ced2 with SMTP id gb1-20020a17090b060100b0020dbd5fced2mr29582429pjb.34.1672262512850; Wed, 28 Dec 2022 13:21:52 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id mz3-20020a17090b378300b002262fcd92desm63488pjb.7.2022.12.28.13.21.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Dec 2022 13:21:52 -0800 (PST) Date: Wed, 28 Dec 2022 13:21:50 -0800 From: Nathan Bossart To: Tom Lane Cc: Peter Geoghegan , postgresql@taljaren.se, pgsql-hackers@lists.postgresql.org, Michael Paquier Subject: Re: BUG #17717: Regression in vacuumdb (15 is slower than 10/11 and possible memory issue) Message-ID: <20221228212150.GA4009813@nathanxps13> References: <17717-6c50eb1c7d23a886@postgresql.org> <3439037.1671130590@sss.pgh.pa.us> <3544447.1671141436@sss.pgh.pa.us> <3672943.1671202149@sss.pgh.pa.us> <407579.1672258403@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <407579.1672258403@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Dec 28, 2022 at 03:13:23PM -0500, Tom Lane wrote: > + /* If we used SKIP_DATABASE_STATS, mop up with ONLY_DATABASE_STATS */ > + if (vacopts->skip_database_stats && stage == ANALYZE_NO_STAGE && !failed) > + { > + executeCommand(conn, "VACUUM (ONLY_DATABASE_STATS);", echo); > + } When I looked at this, I thought it would be better to send the command through the parallel slot machinery so that failures would use the same code path as the rest of the VACUUM commands. However, you also need to adjust ParallelSlotsWaitCompletion() to mark the slots as idle so that the slot array can be reused after it is called. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com