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 1pAdtc-0005GL-Kt for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Dec 2022 21:23:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pAdtb-0003ua-Gi for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Dec 2022 21:23:31 +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 1pAdtb-0003uH-7r for pgsql-hackers@lists.postgresql.org; Wed, 28 Dec 2022 21:23:31 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pAdtU-0002zz-R9 for pgsql-hackers@lists.postgresql.org; Wed, 28 Dec 2022 21:23:30 +0000 Received: by mail-pl1-x633.google.com with SMTP id 17so17188502pll.0 for ; Wed, 28 Dec 2022 13:23:24 -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=pg3plnGu5r0Z4ODsbEpocWNCVqK+d9xrV+JYw3S3m1I=; b=VXO67EaXrVTRj3Soqj3/txko9c2TBJObi8J+yoPCgPaZGcdcSJWC6uZd3W/ExbQfY2 2RU62ErRbvdeNpKNroys84G2sbshzu060HK9+SUpUUlzjPUDnZOzHarYlmxZf5H8r9ox XeKBhZuXGanAlf7DnrgSSF7WTqg50MUCKosa/vuKmOoqszJwp6jtp6AVSLHSLYiMYGWb 0jBItmKdHAW8fokcJLSOtDE2vcY/scOZhdyq+o7CWYBqKiA9Pgpn8bEo3YzQaHTuOlmW Yp/aoVCNpjK2Osbyxg6aW7wNrXS+tbWwgaLjaOjVH863BmHkUFTe1Ct1SYh4Qbh1ITPW D76A== 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=pg3plnGu5r0Z4ODsbEpocWNCVqK+d9xrV+JYw3S3m1I=; b=w/aib8AggRildVp7t49ykInRKdmtOOrgdymTF4z2gjOBh4uFrCwDEFc13EvkpQA8Dp 8W1wIOk6rvB+qcpMNR6bL7BRiGpEana9r+3WnmRtXDUVS/W+shzlSYcQXph5XaXkThoc +tfdYvdAMyKYhve4MFKRxbcDU1nYrovfKiOg/1LUSDcE/RY7KAEH/rTEiR5atfAJAClq c42Wv0cmmEKg/Z3u6YuFFZ1KzN/U9hipZsiY6+SIe++NVssLDr/rU2HmlczURse0ZXuA kTIIdcuRutI2vDYXw6e43WPkmJZHZRUsgGe9/krCBit2HjLANzdvQUjWLLqI/k5tKWRN 2+GA== X-Gm-Message-State: AFqh2kqemwnFi8YiS4RAbZ/WbzPiuK4u0j3xxBEKpsTiDn01fon/zD52 SxEyECzDELQqf2ytHDrg+eA= X-Google-Smtp-Source: AMrXdXvzBiIvFL4YzFMtjLQgQAILWROv6ivXwo96W5HrkN6IBNJbDWbYH9tXPe203tiXvzjum/Xtag== X-Received: by 2002:a17:903:2404:b0:18d:61f6:e254 with SMTP id e4-20020a170903240400b0018d61f6e254mr44112602plo.33.1672262603893; Wed, 28 Dec 2022 13:23:23 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id l6-20020a170903120600b00190c6518e30sm11366960plh.243.2022.12.28.13.23.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Dec 2022 13:23:23 -0800 (PST) Date: Wed, 28 Dec 2022 13:23:21 -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: <20221228212321.GB4009813@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> <419503.1672262419@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <419503.1672262419@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 04:20:19PM -0500, Tom Lane wrote: > 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. That's a good point. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com