Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qjYc6-00BNoI-KT for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Sep 2023 05:22:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qjYc4-0015Zz-O7 for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Sep 2023 05:22:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qjYc3-0015ZX-9D for pgsql-hackers@lists.postgresql.org; Fri, 22 Sep 2023 05:22:00 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qjYbx-005xxw-KN for pgsql-hackers@lists.postgresql.org; Fri, 22 Sep 2023 05:21:58 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 4573B5C015A; Fri, 22 Sep 2023 01:21:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 22 Sep 2023 01:21:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1695360111; x=1695446511; bh=vm +PMp4vpr3FJjTQHg/vpT/q06R4uhGhSe5DSyjUItg=; b=t06k/2DSZunK5M1bYd 0NdEYekgNubkv3cMTPrWiqX3cxptX7WOrbCj5dVJXNEh3YnhQ3i7lxa5eGoh920r 9UA8jkS5GRANDeBEPR1wPLaxnFoMbb+lfPrXekYADvWiafRFSWMfV08MoTad/q99 rZSSsEHUeltD+NRHf0UsNsoMNKJDlzMCgeMKwXulQBLAM4Rguq3VuFjk/Wg4JaTp X/IhLYXTYI00QUC23caDqgTxxLoGm0ARR879nd3tvvRRVK2hKVPBkx0ZPMwnA4w2 fs7obOXxEkTP7wmCP04C98/DXNy9xeu8rjcC4+TkMfkX3Nm8q7K1N+/XDKtlg+c6 5+Yw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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=fm2; t=1695360111; x=1695446511; bh=vm+PMp4vpr3FJ jTQHg/vpT/q06R4uhGhSe5DSyjUItg=; b=A87neYst7lspv9/izPEvrtHc3WJDF 6iDujVhSSDLk5Q/IoP5drmwODpAu7JoPgv0S+u2sfzT00b4/OwXRUoYDqr/MfxKN vnVDdxnPpnNK2YNf2APZBis7XfNPN/taZbFRpMl1l8lylGA72Ad7wsWFak3QKMhQ /81fAh+H0hNApRULqsRlwtfqpfYVtJCCUCW8tAit1I2xjzrNYEvEAJUamVeiYjhX hQtGS9eAEvOjkMYYZA9QO9KQKjGIi50FbGxUrOKe19BioWEXgLpJUoX4NfrbfIkP w3bUc/3WJbidRUIv65lT3NA6y7sq9Tsc3liHyrajASwAmhaZmWSfVQlLg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekjedgledtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghq uhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvg hrnhepteelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdej necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitg hhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 22 Sep 2023 01:21:49 -0400 (EDT) Date: Fri, 22 Sep 2023 14:21:46 +0900 From: Michael Paquier To: David Rowley Cc: Ryoga Yoshida , pgsql-hackers@lists.postgresql.org Subject: Re: Bug fix in vacuumdb --buffer-usage-limit xxx -Z Message-ID: References: <08930c0b541700a5264e5fbf3a685f5a@oss.nttdata.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RyTd63GSJZlQ6ZuP" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --RyTd63GSJZlQ6ZuP Content-Type: multipart/mixed; boundary="YvYCb8YZ2yTmffDV" Content-Disposition: inline --YvYCb8YZ2yTmffDV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 21, 2023 at 06:56:29PM +1200, David Rowley wrote: > I deem it pretty unlikely that someone will accidentally remove the > code that I just committed and a test to test that vacuumdb -Z > --buffer-usage-limit ... passes the BUFFER_USAGE_LIMIT option would > likely just forever mark that we once had a trivial bug that forgot to > include the --buffer-usage-limit when -Z was specified. Perhaps so. > If others feel strongly that a test is worthwhile, then I'll reconsider. I don't know if you would like that, but the addition is as simple as the attached, FYI. -- Michael --YvYCb8YZ2yTmffDV Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="vacuumdb-tests.patch" diff --git a/src/bin/scripts/t/100_vacuumdb.pl b/src/bin/scripts/t/100_vacuumdb.pl index eccfcc54a1..597bbd8f54 100644 --- a/src/bin/scripts/t/100_vacuumdb.pl +++ b/src/bin/scripts/t/100_vacuumdb.pl @@ -40,6 +40,10 @@ $node->issues_sql_like( [ 'vacuumdb', '--disable-page-skipping', 'postgres' ], qr/statement: VACUUM \(DISABLE_PAGE_SKIPPING, SKIP_DATABASE_STATS\).*;/, 'vacuumdb --disable-page-skipping'); +$node->issues_sql_like( + [ 'vacuumdb', '--buffer-usage-limit', '0', 'postgres' ], + qr/statement: VACUUM \(SKIP_DATABASE_STATS, BUFFER_USAGE_LIMIT '0'\).*;/, + 'vacuumdb --buffer-usage-limit'); $node->issues_sql_like( [ 'vacuumdb', '--skip-locked', 'postgres' ], qr/statement: VACUUM \(SKIP_DATABASE_STATS, SKIP_LOCKED\).*;/, @@ -48,6 +52,10 @@ $node->issues_sql_like( [ 'vacuumdb', '--skip-locked', '--analyze-only', 'postgres' ], qr/statement: ANALYZE \(SKIP_LOCKED\).*;/, 'vacuumdb --skip-locked --analyze-only'); +$node->issues_sql_like( + [ 'vacuumdb', '--buffer-usage-limit', '0', '--analyze-only', 'postgres' ], + qr/statement: ANALYZE \(BUFFER_USAGE_LIMIT '0'\).*;/, + 'vacuumdb --buffer-usage-limit --analyze-only'); $node->command_fails( [ 'vacuumdb', '--analyze-only', '--disable-page-skipping', 'postgres' ], '--analyze-only and --disable-page-skipping specified together'); --YvYCb8YZ2yTmffDV-- --RyTd63GSJZlQ6ZuP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmUNJGoACgkQnvQgOdby QH3U9Q/7BRlcdzUA9l3MxwYm14SpTS2fnXBV8JXsgNW1hZ6d+jY0VNUuMN/dA+04 fXC6JjJV9QbjdVbkpFeJ8TAZQ9SG6wD3MN2rv8gqeTJMbTA3knE7NzorGdFQsQFK NOaB5DO18wYOI0on/9zuY/Iv6Sy3j5MRZaPIoFRnSk8g3LN/uANQc7wr6MLc3PMK lz0El8g7NYNgL6yzKUiygp68dIX5Mlt5rEZCDLUivr8yyRVlzOMedE8MY0T989g4 18hQ1RebaP8ZVhm4RqEJ8K8ET9/oF9rXeQ7ssVmGIxV0LTPL077qmLab9nHuf10u KF4wY6nA2flwPmggMWmHo+HFBds5b00H3hA7wUVR4OKRmkN3RpKkwJFLg5llyJkj qDD8GsSHwLY2JUC/Bnu2/NxZtAWgHWkeughSXzXxk+KMJ0I4wvc5GrJh1U5g9JoO M5Wu05Z6PRcG5hi8Ut0Ge+XpTIwn7e7ePdUn+SrIrSQpUAMVT15zmepAb1SZpHyi Fq9mjoCU/rDMaFkK4N6pM1WP/1jmW57o9KK+EqHsdNDFNNVJMV7geH5ZyNj81afb gMMSlvQoxlRKrCAJipUalv+vDYQb43iEU3yTLXYdwIBPYhNHbLOwAMkyIoZP0vjT g3yQihp6t582vgY3bbcjplXLGdulUH/k2dv7xes40dAM9UHWq9Q= =zf2R -----END PGP SIGNATURE----- --RyTd63GSJZlQ6ZuP--