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 1ukTNW-002pbQ-NO for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Aug 2025 20:07:51 +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 1ukTNV-00FwB9-CV for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Aug 2025 20:07:49 +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 1ukTNU-00FwB0-Rm for pgsql-hackers@lists.postgresql.org; Fri, 08 Aug 2025 20:07:49 +0000 Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ukTNS-001Una-1K for pgsql-hackers@lists.postgresql.org; Fri, 08 Aug 2025 20:07:48 +0000 Received: from phl-compute-09.internal (phl-compute-09.internal [10.202.2.49]) by mailfout.phl.internal (Postfix) with ESMTP id 80BAAEC144A; Fri, 8 Aug 2025 16:07:45 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Fri, 08 Aug 2025 16:07:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilmari.org; h=cc :cc:content-transfer-encoding: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=1754683665; x=1754770065; bh=4bhrhFtCRvuIpPcXadvtsDC4ThZH3uci2gv0MWS6wzk=; b= aQdSQT5/DY7qF5u55eWET9xfFM8gJPI+3xtCcBItNoKUAOjAnMjx7Amj5ssyRxTP 38Ng4kLVq0nCqluXyhPkSrriKHRuf0N5XoQCjl1ExpVVmK0LgPvtxgP3STidGiDl 0GFr3slkCS9anZUQJZ3rv/rVLfeO95qS//nd5tktkoGap041Y62GMGuAlniCXA/6 QssKr4A4dTFYvQ7jEeRh7xyuf+c61BrXDVPcDoLUxU4AxwxgMoXoxCcd5hVZPup2 2c529IGGBzHentzv941cRgv9yI/SBMrh/5zdvj4nISC+MhOHFRVItkYLB0AYXe8n gs2xScPs7hzTt4FFHIEhDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1754683665; x= 1754770065; bh=4bhrhFtCRvuIpPcXadvtsDC4ThZH3uci2gv0MWS6wzk=; b=G hXq/UGRX4KQnSNRIozK7xi8bJS8/QYX6YC6Kekj6sTq+yVUAxpR+wbQuRrOs6UlH BveUpiPwba78djzPNAr3uZwU805F398kMee0mm27It/hNokOXcFLQ9Dkggv80UFW c4Yk5n9MgMugDefUP4kuDnNPiSqD43lQ32oNHMRMuTC+RoSSQjFwUfA9KTBCB9JC J7afWRsizPeedPk8i46vYtPRiPx65nkTD9+0Hqr/2kfb2dKqRsT2bld4p2pp8Ynd DrOTIzfFwbeltoVTvQEcCgM/GdGWZVNoEPVcsAsRVY6zc88APNZZlPsIOFiA3qc2 mZqrv3Zkwc9Zs1PKPv++w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduvdegjeefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefufhffjgfkfgggtgfgsehtkeertddtreejnecuhfhrohhmpeffrghgfhhi nhhnucfklhhmrghrihcuofgrnhhnshonkhgvrhcuoehilhhmrghrihesihhlmhgrrhhird horhhgqeenucggtffrrghtthgvrhhnpedtjeevueejgeejvdffuedujeethffhhefgtdfh ieejffekveekgfdtffejhfdtieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehilhhmrghrihesihhlmhgrrhhirdhorhhgpdhnsggprhgtphht thhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehpvghtvghrsegvihhsvg hnthhrrghuthdrohhrghdprhgtphhtthhopegurghnihgvlheshigvshhqlhdrshgvpdhr tghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqh hlrdhorhhgpdhrtghpthhtohepthhhohhmrghsrdhmuhhnrhhosehgmhgrihhlrdgtohhm pdhrtghpthhtohepjhgrtghosgdrtghhrghmphhiohhnsegvnhhtvghrphhrihhsvggusg drtghomh X-ME-Proxy: Feedback-ID: i1ff147bf:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Aug 2025 16:07:43 -0400 (EDT) From: =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= To: Jacob Champion Cc: Thomas Munro , PostgreSQL Hackers , Daniel Gustafsson , Peter Eisentraut Subject: Re: [PATCH] OAuth: fix performance bug with stuck multiplexer events References: <87ldnvgkdq.fsf@wibble.ilmari.org> Date: Fri, 08 Aug 2025 21:07:42 +0100 In-Reply-To: (Jacob Champion's message of "Thu, 7 Aug 2025 11:11:46 -0700") Message-ID: <87fre1h90x.fsf@wibble.ilmari.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jacob Champion writes: > On Thu, Aug 7, 2025 at 9:35 AM Dagfinn Ilmari Mannsåker > wrote: >> I haven't read the meat of the patch, but I have some comments on the >> tests: > > Thanks for the review! > >> > +IPC::Run::run ['oauth_tests'], >> > + '>', IPC::Run::new_chunker, sub { print {$out} $_[0] }, >> > + '2>', IPC::Run::new_chunker, sub { print {$err} $_[0] } >> > + or die "oauth_tests returned $?"; >> >> We've recently switched to using fat commas (=>) between options and >> their arguments, and that includes the file redirections in IPC::Run. >> Although not semantically meaningful, I'd also be tempted to put parens >> around the argument list for each redirect, so it's clear that they go >> together. > > I have two concerns: > - If I don't put parentheses around the list, the fat comma is > actively misleading. > - As far as I can tell, IPC::Run neither documents nor tests the > ability to pass a list here. (But the tests are a bit of a maze, so > please correct me if there is one.) My fear is that I'll be coupling > against an implementation detail if I write it that way. > So I'm leaning towards keeping it as-is, unless you know of a reason > that the list syntax is guaranteed to work, with the understanding > that it does diverge from what you authored in 19c6e92b1. But I don't > think any of those examples use filters, so I don't feel too bad about > the difference yet? When I said "not semantically meaningful" I meant that the parens don't change what gets passed to the function. In Perl, parens only serve to override precedence and as visual grouping, they don't affect the structure of the data at all. To demonstrate: $ perl -MJSON::PP=encode_json -E 'say encode_json([1, 2, 3])' [1,2,3] $ perl -MJSON::PP=encode_json -E 'say encode_json([1 => (2, 3)])' [1,2,3] >> Also, indirect object syntax (print {$fh} ...) is ugly and >> old-fashioned, it's nicer to call it as a method on the filehandle. > > That is much nicer; I'll do that. > >> As for the C TAP tests, there's already a bunch of TAP-outputting >> infrastructure in pg_regress.c. Would it make sense to factor that out >> into a common library? > > Maybe if we got to rule-of-three, but I'd rather not make either > implementation compromise for the sake of the other. IMO, this is a > situation where a bad abstraction would be much costlier than the > duplication: TAP is lightweight, and I think the needs of a unit test > suite and the needs of a characterization test collector are very > different. Fair enough. > --Jacob - ilmari