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 1pnDjv-0001bU-Ou for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Apr 2023 07:21:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pnDju-0001sE-Cm for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Apr 2023 07:20:58 +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 1pnDjt-0001rz-DR for pgsql-hackers@lists.postgresql.org; Fri, 14 Apr 2023 07:20:58 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pnDjk-002o4W-Oa for pgsql-hackers@postgresql.org; Fri, 14 Apr 2023 07:20:56 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 9E4D45822FA; Fri, 14 Apr 2023 03:20:45 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 14 Apr 2023 03:20:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1681456845; x= 1681464045; bh=9NksMcH/IaWXN5sexqZxPJ+nVXQUl/f1OLsmAz0SGG8=; b=I 5kp1jF47BDwunetZ2bXhcM3yADA6DIrXmUuQSFLoGaUL1xth3ittaShZqcPx/7is fRMrSkQAydOBIPJtBALHgrOQhCPSRXMkv08eouJt0AlOOFrjwS+VBqtGUpmo6v+1 WzEEHvqJ8MamHeuoFNWHILZuMSSCf9xBqerVK8mxzEq2E3gOTEClOUbjgpc1o1fO toXaQwohIbTvlB9pA0ZnWbmFZEgek4Ql3+S7k0pb5z9SFxFCr/RNptaf46B0tO3D 5eHdmv18Mr8yOu/7ttIxg1LrHpZYHN15KI2Rk2mtrxf9mtWUsMtGbZmOP2zZ28rg gHQixBE22QXbI306PDQeg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekledguddvudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeefjeegheetuefhveev udelueeftdejteeiffetvdduhfdtieefgfeutedtveeggfenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghu thesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 14 Apr 2023 03:20:43 -0400 (EDT) Message-ID: <16845cb1-b228-e157-f293-5892bced9253@enterprisedb.com> Date: Fri, 14 Apr 2023 09:20:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode Content-Language: en-US To: David Rowley , Andres Freund , Justin Pryzby , Masahiko Sawada , Bharath Rupireddy , Tom Lane , Peter Geoghegan , pgsql-hackers@postgresql.org, Robert Haas References: <20230405211534.4skgskbilnxqrmxg@awork3.anarazel.de> <20230406172056.gnp7ohxs4bykrn5z@liskov> <20230406214431.2pkmcogizdamdmzz@liskov> From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 07.04.23 02:52, David Rowley wrote: > On Fri, 7 Apr 2023 at 09:44, Melanie Plageman wrote: >> Otherwise, LGTM. > > Thanks for looking. I've also taken Justin's comments about the > README into account and fixed that part. > > I've pushed the patch after a little more adjusting. I added some > text to the docs that mention larger VACUUM_BUFFER_LIMITs can speed up > vacuum and also a reason why they might not want to go nuts with it. I came across these new options and had a little bit of trouble figuring them out from the documentation. Maybe this could be polished a bit. vacuumdb --help says --buffer-usage-limit=BUFSIZE I can guess what a "SIZE" might be, but is "BUFSIZE" different from a "SIZE"? Maybe simplify here. On the vacuumdb man page, the placeholder is buffer_usage_limit which is yet another way of phrasing it. Maybe also use "size" here? The VACUUM man page says BUFFER_USAGE_LIMIT [ string ] which had me really confused. The detailed description later doesn't give any further explanation of possible values, except that 0 is apparently a possible value, which in my mind is not a string. Then there is a link to guc-vacuum-buffer-usage-limit, which lifts the mystery that this is really just an integer setting with possible memory-size units, but it was really hard to figure that out from the start! Moreover, on the VACUUM man page, right below BUFFER_USAGE_LIMIT, it explains the different kinds of accepted values, and "string" wasn't added there. Maybe also change this to "size" here and add an explanation there what kinds of sizes are possible. Finally, the locations of the new options in the various documentation places seems a bit random. The vacuumdb --help output and the man page appear to be mostly alphabetical, so --buffer-usage-limit should be after -a/--all. (Also note that right now the option isn't even in the same place in the --help output versus the man page.) The order of the options on the VACUUM man page doesn't make any sense anymore. This isn't really the fault of this patch, but maybe it's time to do a fresh reordering there.