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.96) (envelope-from ) id 1w7mWc-005gd2-0j for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 03:45:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7mWa-00EcXT-1W for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 03:45:48 +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.96) (envelope-from ) id 1w7mWa-00EcXK-0f for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2026 03:45:48 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w7mWX-00000002HvV-3vFj for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2026 03:45:48 +0000 Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-35691a231a7so3892625a91.3 for ; Tue, 31 Mar 2026 20:45:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775015144; x=1775619944; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TidWVuIq1OK2GPUOP5oFhJz/vx6vU5/O8N3261sGiUE=; b=eoa19TkFbj2Tp7fSrDrV355MxITLbwYBaaAIXt28puVxEYo37dX9Ue6dD2o/qagQ/y 7p9BvmnbQcHsORaQPT7aNrYP21PRopYlE6lhhDLRrpEUfLAVK/f9NFj3J3pLGeBT59Q9 wexOC6vgKVay3HjVK4pCqUbfS803FEPq2SAeMVfYTiiwrGrObDqhM1IuRJl4+DnkNLlU 7cdDSpw8hEljeP7OaSlkwkgTZxgzK3mp2OwuDD68rfw55B8weGnjhXe/CnAeyeBuw4nw QG6jSETmoeIma16qiNvAuEVZoxIM4Ja/no1m0WuBHX7s06Je8kqYvGWTaW8ZLSZkmFd1 TOCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775015144; x=1775619944; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=TidWVuIq1OK2GPUOP5oFhJz/vx6vU5/O8N3261sGiUE=; b=SnXRfffI/997RfMsu3b2rETzidKVnr2nDP0ivmcFxDfwE4AykxXFrKYJqE/ph70ibQ G6o84NY4hjmHM32HwUJAGvMbLJjUkVG6ceEtJlmNFi8iBPfqIgZUxeB2MWKeHfut1J94 wlW+zxEjdu+UkpgPvkeQ/flIkoIlswU4/dGst7fzqr316sGk4VvshMMsoz+YTtIwA2V+ gTBzG78inBgkbtWDodasIsj3xBZHKNLIztVeAN/+lnk9YMvrQFVp91NmFdsvIbif8yKK DSI3w5bsw2Rj5+pIzHdRk2wSVImxFS+8jdiDYDVW0nps+1Fr18RhzdULvNH5WCSQDZS3 TE4g== X-Forwarded-Encrypted: i=1; AJvYcCWvqsQJiaC2DQy/7nBchb7jjR/NYY9GNv+tBFUN3qK546iOBhSH1ANiXVAQZr0QxpPNZ/bmNktZgI0jshKJ@lists.postgresql.org X-Gm-Message-State: AOJu0YxgMlVS6o7A150mE/oxx5e/ZwWhvERF3MrfT5iJ3Le34RuLCj79 Tt018sKA/y2mGAVzEYVqBRI3LNGW6kxBouw8LJTou4BXYjpjzHhfOrNl X-Gm-Gg: ATEYQzxd88NmQ5p/DJb9aFA2MqCdr5O60kO3vk57bsnE6Wk01s/JO9oR7gtoD9tSbsz 4YkbbJ/X6iIW3WuEwSDHc7GsB98O+vGTVn0UfkzIo1CDiPTEa9ZqGYNIftdiQHJl9lhgmjzS+eV EGXP5BZhvncJECiGyQA/y8d7rGKi7sxaTPVbmj0xIYJmmt7G8gMPDmkeAoXirztGuW29FBq5Sz9 eBoqZuH2pcYKIisKYVK9KqUg+ebgqfBZkTvz3yPcWlge5Eh5rTAoC0EB3IDgNrbEbPBOvmh5rAi lA6IbteHjs0bKzps5IjRRSp3idiHDZtTV60xpM4PjSvKcIygfCwQy6ipxhZw9pCIBDTov8xCC/a eqAUSv9wLUM0W0az8EmCqWUx0l5kEcG4S6mtYyD1XQv3/6EQfXiqLfmSyBzoiVhuiTHyc3dLLsJ jo5rChVi9H/1hDVJ9Xk+qiK7fziAYzAolq X-Received: by 2002:a17:90b:1350:b0:35c:b02:b5c1 with SMTP id 98e67ed59e1d1-35dc6e2d00dmr1764369a91.2.1775015144433; Tue, 31 Mar 2026 20:45:44 -0700 (PDT) Received: from smtpclient.apple ([185.135.79.125]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-35dbe6afb78sm3337865a91.13.2026.03.31.20.45.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Mar 2026 20:45:43 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: [oauth] Split and extend PGOAUTHDEBUG From: Chao Li In-Reply-To: Date: Wed, 1 Apr 2026 11:45:08 +0800 Cc: Zsolt Parragi , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <89B8BFC0-582F-4A59-97D3-1829EFA04E45@gmail.com> References: To: Jacob Champion X-Mailer: Apple Mail (2.3864.400.21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Apr 1, 2026, at 07:50, Jacob Champion = wrote: >=20 > On Tue, Mar 31, 2026 at 10:45=E2=80=AFAM Zsolt Parragi > wrote: >> I didn't want to write "print-poll-counts" and "print-trace" as those >> are just longer, while simply writing "plugin-errors" without print >> also seemed wrong. Maybe it could be "plugin-debug" instead, that >> sounds good even withour print? >=20 > I like `plugin-errors`, actually -- "I want to debug these plugin > errors." Adding -debug to the name doesn't seem great to me, since > it's clear from the context that we're debugging. >=20 > `dos-retry` still doesn't quite convey what we're doing... > `dos-endpoint` maybe? `busy-loop`? The unsafe aspect is the resource > consumption... >=20 > To keep the brainstorming going, I chose the following for v3, but > they're by no means settled: >=20 > - http > - trace > - dos-endpoint > - call-count > - plugin-errors >=20 >>> I have a sample patch locally for these suggestions, if you'd like. >>=20 >> I can create a patch with these updates tomorrow, but if you already >> have it, that might be easier/quicker. >=20 > In the interest of time I've attached it as a single patch, but the > range-diff is rough to read. If you'd like, I can split the code > motion apart from the logical changes tomorrow, to see if it helps > with review. >=20 > --Jacob > = Looks like this patch helps reduce uninteresting debug logs. Overall, it = looks good to me. I just have a couple of small comments. 1 ``` +#define OAUTHDEBUG_UNSAFE_HTTP (1<<0) ``` Since the flags are defined as uint32, does it make sense to define = these flag constants as ((uint32) 1 << 0)? 2 oauth_get_debug_flags() reparses PGOAUTHDEBUG every time it is called, = which feels a bit unnecessary. But I don't think this is a big deal, = since these debug options should never be enabled in production. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/