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 1uk55v-00FUgv-38 for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Aug 2025 18:12: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 1uk55t-008Xl2-PW for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Aug 2025 18:12:01 +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 1uk55t-008Xkp-Fz for pgsql-hackers@lists.postgresql.org; Thu, 07 Aug 2025 18:12:01 +0000 Received: from mail-qv1-xf2c.google.com ([2607:f8b0:4864:20::f2c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uk55q-001Itc-2z for pgsql-hackers@lists.postgresql.org; Thu, 07 Aug 2025 18:12:00 +0000 Received: by mail-qv1-xf2c.google.com with SMTP id 6a1803df08f44-707453b031fso16794156d6.1 for ; Thu, 07 Aug 2025 11:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1754590317; x=1755195117; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=DsaptEBIeWDqHG2st3vHFmcvUOUkh1K7xNbKLWIbPd4=; b=TTSi37Bf1BiCm9zxoKC4z0Lwl3VTEPFxiYwKUkl+fFOmRypenBZF2u0WKG4q7sFiJi 5pPlHmR3RcZO81pu9KCYeLtr+hwNY+fOhcdm4zgVLwJ8GURbbRE/49Ww1hOzYqxwEG6m Ph+W3zQnKQGNuARzwbR+RXLqUJ3lSl3GGtrlDSb0Z7htVVNMRZpxHiQKQQH3SENoEqWG pBQzqxdvja+9jzhGSPwujX/tMoYO8HXV8mCiodQA9mbXVckUX1UyLXer21xXDegVz8p/ oFq8dQrwi8Vwt+jTLFUQlhD0WmRH/34aIHnl5jbDPAVP1/fZgzUSNcnl6Kh/Ak8yxPN4 23cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754590317; x=1755195117; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DsaptEBIeWDqHG2st3vHFmcvUOUkh1K7xNbKLWIbPd4=; b=YCEy9M6Pgh1ZKQUyHFfyxwy0VCR7BHTAq+vr1s+kj5HwoZuFJfFJ6pKcOBBCVdeZB0 ls2V4eJfIL1TzIrpk5KRRTqsfGQUlibvAVXCwVVco5z4GP8ZsbWYqW0OjO0m7yb+E23/ DoLwCuZwf9vs70NGI4CvsGkO3ABdwrYWl53Zh9F5MxoKHoC9sixGyJADOdk7OrbGeGf9 EF+zUYfayXHVok1r2Q0Un0VqWZKYcQGfPpVuUaQjjDaGFqptyqAPUZMMPZH3yVNKc3v1 5OjqMeFXR5SbmMjLAR3mGPsa/C+VVRj39Iq/4BvIFXhmPTSTNPNIREPTHVgk2khI2fKR cxNQ== X-Forwarded-Encrypted: i=1; AJvYcCWsmHLuM9nWcJbo9SMfcrOlhCTZQpjfzEv4VbQh/I8p1g5ZX038099fPhmIZTExJz33/rAncmKxNKxeyl5q@lists.postgresql.org X-Gm-Message-State: AOJu0YzLtmGb4vWA5iwE7/3cAgpF1ugyms7Dsvd1nKlKl04i3EFsgQei iTMxJwcXvCPtjcE+CnuAqNHmG1UB7NjTHivkvWAK3oRA6SyBElUC1vxHwObWADxEFtgInS0akG1 SzhifxeioPmJw7Wp8sFbfc6MJRqKwl+2+PCWPq98H X-Gm-Gg: ASbGncv2up6BteuVszjSqhxM4aEZBg2TU+GGL0xzYKqH3SgW1Vw6Miv7nIXAixMeySm khX4VWXquzSUlUyl2kBslFTGr8DlcGhMiAkmBzPM4gnmwDtaJMBU3lRmbyFMc8rpjGolG5JBBBj 9zGRXfIYnVqf0Fhnce0TWHj2pNG8AQS93v4SjFYbUuxuyUuopRl7GV/ZwFszpQLhWqka14i+B5U 79mv9UipWHMktd2Fg== X-Google-Smtp-Source: AGHT+IEnWUXvRWYImboCEk/NIjlDe/AoVS5W56ly0iAkpiomgRyqH9ZGC5b36BS2tvshbmTI2n0Y7cfAAgAL1tglR24= X-Received: by 2002:ad4:5cae:0:b0:6fa:ce27:5975 with SMTP id 6a1803df08f44-7099a313f96mr3110886d6.22.1754590317389; Thu, 07 Aug 2025 11:11:57 -0700 (PDT) MIME-Version: 1.0 References: <87ldnvgkdq.fsf@wibble.ilmari.org> In-Reply-To: <87ldnvgkdq.fsf@wibble.ilmari.org> From: Jacob Champion Date: Thu, 7 Aug 2025 11:11:46 -0700 X-Gm-Features: Ac12FXzAAjmuY0A1UrsQAPB7oLPNpCI4a4DsbRSUDF6l3NakJUycVkNcozyfKO0 Message-ID: Subject: Re: [PATCH] OAuth: fix performance bug with stuck multiplexer events To: =?UTF-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= Cc: Thomas Munro , PostgreSQL Hackers , Daniel Gustafsson , Peter Eisentraut Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Aug 7, 2025 at 9:35=E2=80=AFAM Dagfinn Ilmari Manns=C3=A5ker 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 (=3D>) 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? > 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. --Jacob