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 1pAdqe-00052m-BA for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Dec 2022 21:20:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pAdqc-0006xp-7j for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Dec 2022 21:20:26 +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 1pAdqb-0006xg-V1 for pgsql-hackers@lists.postgresql.org; Wed, 28 Dec 2022 21:20:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pAdqZ-0002y0-9o for pgsql-hackers@lists.postgresql.org; Wed, 28 Dec 2022 21:20:24 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 2BSLKJR0419504; Wed, 28 Dec 2022 16:20:19 -0500 From: Tom Lane To: Nathan Bossart 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) In-reply-to: <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> <20221228211253.GA4009571@nathanxps13> Comments: In-reply-to Nathan Bossart message dated "Wed, 28 Dec 2022 13:12:53 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <419502.1672262419.1@sss.pgh.pa.us> Date: Wed, 28 Dec 2022 16:20:19 -0500 Message-ID: <419503.1672262419@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > 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. I thought about that but it seems fairly unsafe, because that means that vac_update_datfrozenxid is executing inside a user-controlled transaction. I don't think it will hurt us if the user does a ROLLBACK afterward --- but if he sits on the open transaction, that would be bad, if only because we're still holding the LockDatabaseFrozenIds lock which will block other VACUUMs. There might be more hazards besides that; certainly no one has ever tried to run vac_update_datfrozenxid that way before. regards, tom lane