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 1pAhfK-0003ig-78 for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Dec 2022 01:25:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pAheK-0002jG-Gx for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Dec 2022 01:24:00 +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 1pAheK-0002gh-7g for pgsql-hackers@lists.postgresql.org; Thu, 29 Dec 2022 01:24:00 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pAheG-00051Y-Vr for pgsql-hackers@lists.postgresql.org; Thu, 29 Dec 2022 01:23:59 +0000 Received: by mail-io1-xd30.google.com with SMTP id p6so9107597iod.13 for ; Wed, 28 Dec 2022 17:23:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=user-agent: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=fw32Vp2WDAIVKzMQ6I9XX2WtEUxZG6OGKzSEPNqTigU=; b=OEjade/p2e1J1uGHJifl4HSKdM33RG0F4ztQppbh4Hx2JLf4Grfe0JTmOZpjibNpga lSrzGjXUoB0TYgaX48Em7nEOzP5inCs1zcTYWKgtJTDjsazYerbsL0ieQF60SM8isWSx aj7XQD6WotwDHfaPA3ACGW1o/3typkAK7Q7ehQjjMC/H1Lw0lA7CFov8ynHRQTmxuINT W+md2McnJflQcwzHezEoqXlgh3IU2ERtHNxzNSlXMzSO0bjdLI0dcAhXVt0L4hxSHctF SISpK+Q1MMWEY/xOjFmuky3rBbYrvkZ6CnSzS23gLgBwm6RZ2sPuT7ci5VcaiXsQSkeN C2wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent: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=fw32Vp2WDAIVKzMQ6I9XX2WtEUxZG6OGKzSEPNqTigU=; b=LnVYuD2CEkxr5EpAA/NYv9wbAB6S12/3BP520OjeOotlxXjKmg2o5CEx1I+PXRQnPs pAagdSDVTn8LAtqCBvQNwBqVM+bIlSBokakrnayLtrsJ8gVGew6NCkgbsqZ+oXldgF+m rAST3assu4JvuU7XlOeVwvvXJNfBEEqnqYme77P7ENa5ZoR8xkSotaPm4p7mZVcOnF48 5FKulb5S8noozpMpvPI0Y5nww5+lcdMHUQJCca7hyRFvS7D9iNvo1qNvtqOi2kG0DJr0 IRO7w2sAXPefH0iDe+bg4nSU99TZr3xid8EBJZeBvZLE4OfTHk7eN6cwG2kCh9BdHc5e ML+w== X-Gm-Message-State: AFqh2krtT8KKXU0deJDsHk4yJbhMXyjA0k/tDk/ZVryT6rcnS1Uilylo z44IPh4vONEM5IzB1BEe6v+yMpJiNQPrxPb0 X-Google-Smtp-Source: AMrXdXtwY8C7BN2GxBgP7hBTFHtbV991IGHJfp2TCkH9mWOr87F5NiR0yPxMc4nFbjikXq8TQsVzEQ== X-Received: by 2002:a05:6602:2105:b0:6e3:187:f4fe with SMTP id x5-20020a056602210500b006e30187f4femr157591iox.15.1672277035775; Wed, 28 Dec 2022 17:23:55 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id n35-20020a056602342300b006bb5af55ddfsm6277208ioz.19.2022.12.28.17.23.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Dec 2022 17:23:55 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 65D94801319; Wed, 28 Dec 2022 19:23:54 -0600 (CST) Date: Wed, 28 Dec 2022 19:23:54 -0600 From: Justin Pryzby 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: <20221229012354.GF1153@telsasoft.com> 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> 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 Wed, Dec 28, 2022 at 03:13:23PM -0500, Tom Lane wrote: > Peter Geoghegan writes: > > On Fri, Dec 16, 2022 at 6:49 AM Tom Lane wrote: > >> That is a really good point. How about teaching VACUUM to track > >> the oldest original relfrozenxid and relminmxid among the table(s) > >> it processed, and skip vac_update_datfrozenxid unless at least one > >> of those matches the database's values? For extra credit, also > >> skip if we didn't successfully advance the source rel's value. > > > Hmm. I think that that would probably work. > > 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. I was surprised to hear that this added *two* options. I assumed it would look like: VACUUM (UPDATE_DATABASE_STATS {yes,no,only}) -- Justin