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 1pAdkS-0004co-Jd for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Dec 2022 21:14:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pAdjS-0002vI-JF for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Dec 2022 21:13:02 +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 1pAdjS-0002v9-5v for pgsql-hackers@lists.postgresql.org; Wed, 28 Dec 2022 21:13:02 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pAdjO-0002vG-Qx for pgsql-hackers@lists.postgresql.org; Wed, 28 Dec 2022 21:13:01 +0000 Received: by mail-pf1-x429.google.com with SMTP id y21so9269157pfo.7 for ; Wed, 28 Dec 2022 13:12:58 -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=flPDSAZgydGWJy8jNTp1SrHh2Mjetyfmc/7iRSeHLew=; b=Yy5+nNjh7DARWsIeqrAS1gkXq6fo9B9bKu3lMW/ZSultILbvq45QeBnJMQHCU8m7xZ 5aLqGReKdTkD5laqoktkvVqIXX/vVI5x5l0PDGJeKzWAbKR5gX3frST/5aT0c0s6D1gC AkHn0rwi7Wff3R3aKgbFwn6OLRoMHv5fvg2SUHD/rpozleYUmCs+woHvZKXzq+pZb9Pe df8aM85zxMVMWt7eyy34BGFxOUSqkAtX6RG2hMOKgG3gPCfGrIuRX7RYRw/ywz8mCeMR 54eYN0OM/4x9y6/2XkgrU13ootpztlpbH3F/iwRkA1Ur/ckg0XRQoZCM8kfUSyZ5AL9k 4jvw== 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=flPDSAZgydGWJy8jNTp1SrHh2Mjetyfmc/7iRSeHLew=; b=71fxU0q9p2skJqc0OmK/9oHu2obbRysRVrMCiya2ZxH3Amocpzp0O5jPgkcmIOZcV3 OiMNbbGk24pNa6yGPvmySwf103fqaS5GifFHNh6jhqxTV+qsGNDivPj4YUuWcyjrwbB+ 1de2LXXy0ZpT3We0h/GpPD6oSJJq11yn0DvJzcFiQZkDy5Rh0vTYoT6C7hrDKXigO8q4 RN6HDo0VDV7EaOctmnBfWQkOork+kCoB5NgDzSIyBvftSD7MIfa66itHXTsiMBqfUIyc HBBDAGzKTPOPp7586h7XWGt16JwD2OWiWR9XhjEIPbwl+J6rLGYwfje1h8ajwAjEz+gt TuKA== X-Gm-Message-State: AFqh2koO283xH9GShxB/IQjnIDU38PQFvvO8POcqye4B3ztVokpHRzMu 7JJl/Ca8gJIObPCRa2XKqdg= X-Google-Smtp-Source: AMrXdXvE3SIrC2Y4lHNsJx439oiz5drsGxLJBjqnJSV3dYPjldE+BTLLXzs51FwkOlLfw2DV04ZcmQ== X-Received: by 2002:a05:6a00:168d:b0:577:2a9:ec82 with SMTP id k13-20020a056a00168d00b0057702a9ec82mr32465971pfc.5.1672261976383; Wed, 28 Dec 2022 13:12:56 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id f186-20020a6251c3000000b0056c3a0dc65fsm10790905pfb.71.2022.12.28.13.12.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Dec 2022 13:12:55 -0800 (PST) Date: Wed, 28 Dec 2022 13:12:53 -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: <20221228211253.GA4009571@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: multipart/mixed; boundary="SUOF0GtieIMvvwua" 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 --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Dec 28, 2022 at 03:13:23PM -0500, Tom Lane wrote: > I'm forced to the conclusion that we have to expose some VACUUM > options if we want this to work well. Attached is a draft patch > that invents SKIP_DATABASE_STATS and ONLY_DATABASE_STATS options > (name bikeshedding welcome) and teaches vacuumdb to use them. This is the conclusion I arrived at, too. In fact, I was just about to post a similar patch set. I'm attaching it here anyway, but I'm fine with proceeding with your version. I think the main difference between your patch and mine is that I've exposed vac_update_datfrozenxid() via a function instead of a VACUUM option. IMHO that feels a little more natural, but I can't say I feel too strongly about it. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com --SUOF0GtieIMvvwua Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0001-add-UPDATE_DATFROZENXID-option-to-VACUUM.patch"