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 1taF46-0002hl-84 for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Jan 2025 14:17:15 +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 1taF44-00HAIV-6A for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Jan 2025 14:17:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1taF43-00HAII-Fs for pgsql-hackers@lists.postgresql.org; Tue, 21 Jan 2025 14:17:11 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1taF3z-000jKA-2z for pgsql-hackers@lists.postgresql.org; Tue, 21 Jan 2025 14:17:10 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 5A2CE13801E7; Tue, 21 Jan 2025 09:17:06 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Tue, 21 Jan 2025 09:17:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilmari.org; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1737469026; x=1737555426; bh=+YpqEHiHP0 lWvIocXDsKPOl0MhpUoiUU8YWZhBKLi8o=; b=I8Dm1mLGWVte9cbh7zXy2wca86 jCHWCe+6VCIXVKvlKhrHcKI0fmQtY4RZl/ijlLgN+KJZ7AJeNW+pLvOq+/gS8EKP zTzFebo3jagwPpIbRIpgEjXK53xBwPPYYHJFzmqPnRyDS4GrQHeD4k3bCar0QKYn kNmDI1ZTuJgw32Mfwo8GVPCOt6uHeRmB2/mqlrjO1Trqt9izxr+YNQkq/PIuaOe3 6g1tgdOqEEOR4roKSVgk1cw59Bx4IRzYC6DfjLsWZAa708SUp0IoVnCltMMfDqaH edJGzlM9ZqKb3lCkKy0WSaxXjx9DpDYVrvwb0FYT6rLA+H6fNcX8L9KIWA3A== 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:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1737469026; x=1737555426; bh=+YpqEHiHP0lWvIocXDsKPOl0MhpUoiUU8YW ZhBKLi8o=; b=pepfs6crjl+Dr598kQGK3lUOceQjAuGLbdbFRE1w5g6dIXIbBct DlhDdD0LbalWKC4lFtCW2wIIaXcw7ehGcIf/NiGpEzKDtCeN0e8k4amDtNxq4BJo gZ7wzS5/w4/2AtIPZcu4rt5cPZVvkK+kbcY77Hb3TAMe/M7pSVXU0C/fkZVWyhqH i5sSokj19CQ8dLX8x9/7Asmj/vsLeaPTVOqCsYbNuOMBG7deQmvdNyFd2Fx5hfA2 2ZIKX3otuzsBIn3GwacypFxLXc39IdmxU97OEiVrD8NmSmKm7aiOoCdqk3Fexie6 r7GQ+TVyM1sROEc3/X9EIe1rOF0AE7STQ1Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejvddgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufhffjgfkfgggtgesthdtredttderjeen ucfhrhhomhepffgrghhfihhnnhcukfhlmhgrrhhiucforghnnhhsnohkvghruceoihhlmh grrhhisehilhhmrghrihdrohhrgheqnecuggftrfgrthhtvghrnhepkeeljeeufefhffek hfektdefleeuvdeiiefhheeffeefgeegudffudehjeejiefgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihhlmhgrrhhisehilhhmrghrihdr ohhrghdpnhgspghrtghpthhtohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoh epphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg pdhrtghpthhtohepthhglhesshhsshdrphhghhdrphgrrdhushdprhgtphhtthhopegrnh gurhgvfiesughunhhslhgrnhgvrdhnvghtpdhrtghpthhtohepshhmihhthhhpsgdvvdeh tdesghhmrghilhdrtghomhdprhgtphhtthhopehmihgthhgrvghlsehprghquhhivghrrd ighiii X-ME-Proxy: Feedback-ID: i1ff147bf:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 Jan 2025 09:17:05 -0500 (EST) From: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= To: Michael Paquier Cc: Peter Smith , Andrew Dunstan , Tom Lane , PostgreSQL Hackers Subject: Re: pg_createsubscriber TAP test wrapping makes command options hard to read. References: <87pllx5cqn.fsf@wibble.ilmari.org> <87msh159c3.fsf@wibble.ilmari.org> <0f5256ec-d63e-4e0f-9b71-750a7a4e5c01@dunslane.net> <651128.1734017715@sss.pgh.pa.us> <87jzc46d8u.fsf@wibble.ilmari.org> <5f41d6c6-1cbb-494d-a5c4-3c449fc4e9ad@dunslane.net> <105f432a-6b0b-42d4-9061-65d263279be7@app.fastmail.com> <87ldv542fk.fsf@wibble.ilmari.org> Date: Tue, 21 Jan 2025 14:17:03 +0000 In-Reply-To: (Michael Paquier's message of "Tue, 21 Jan 2025 16:40:18 +0900") Message-ID: <87frlc45gg.fsf@wibble.ilmari.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > On Tue, Jan 21, 2025 at 10:31:01AM +1100, Peter Smith wrote: >> I applied the v5* patches and ran make check-world. All passed OK. >> >> Your fat comma changes have greatly improved readability, particularly >> in 040_createsubscriber (the file that caused me to start this >> thread). Thanks! > > It is not an improvement in only 040_createsubscriber, all the places > Dagfinn is touching here feel much better with this new syntax. Thanks, I'm glad you agree. > You have spent a lot of time on the change from short to long names > and on the new convention grammar for the option/value duos, clearly. I did it by grepping for the various functions that call programs, such as command_((fails_)?like|ok) etc, and then reading the docs for each command to find the corresponding long options. It got almost meditative after a while, especially once I got some Emacs keyboard macros dialled in. The ones in src/bin/pg_resetwal/t/001_basic.pl I deliberatly left short because the error messages refer to the short spelling even if you used the long one. > It took me some time to read through the patch to catch > inconsistencies. > > - [ 'pg_verifybackup', '-s', $backup_path ], > + [ 'pg_verifybackup', '--skip-checksum', $backup_path ], > qr/backup successfully verified/, > '-s skips checksumming'); > > This one in pg_verifybackup should perhaps switch to the long option > for the test description, like the rest. Yeah, good point. > The option should be named --skip-checksums, causing a test failure in > the CI. All the tests passed for me on both Debian and macOS, I guess their getopts accept unambiguous abbreviations of options. > -my @pg_basebackup_cmd = (@pg_basebackup_defs, '-U', 'backupuser', '-Xfetch'); > +my @pg_basebackup_cmd = ( > + @pg_basebackup_defs, > + '--user' => 'backupuser', > > There was a second series of failures in the test > basebackup_to_shell/t/001_basic.pl because of this part. The option > name should be "--username" for pg_basebackup. Yeah. > With these two fixes, the CI is happy, which should hopefully be > enough for the buildfarm. But we'll see.. > > I'd like to apply what you have done here (planning to do a second > lookup, FWIW). If anybody has objections, feel free to post that > here. Thanks again for reviewing this monster patch. - ilmari