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 1w7rz5-005mIm-2z for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 09:35:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7rz4-00GKpm-0b for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 09:35:34 +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 1w7rz3-00GKpd-2k for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2026 09:35:34 +0000 Received: from mail-yw1-x112f.google.com ([2607:f8b0:4864:20::112f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w7rz1-00000002KS6-0xm1 for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2026 09:35:33 +0000 Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-794719afcd4so35433077b3.1 for ; Wed, 01 Apr 2026 02:35:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775036129; cv=none; d=google.com; s=arc-20240605; b=O5k0Q7pf8sdcpc74lVoRD+Nf9toMPG4l8YcQhqfCBdOcJguzRyo4VBKKB/gAC9qbj5 C8v2R8LYUUZZoCkZ4dl3tYtEUBNzazxMBeiH3Dski9gMw6fa3ZIC+/3aYPX8RaUB2X0Q DtK07xYFJejaZDVEq5kZp26Urg6dM8aro9RVMBrXZSj5sZRkN4Zc2094+eEp7YkJep1O sDUYNkTRgvS8UnkMpg9RfMOoNSbBlJ/CY8TrTeMivbnhKnF9HI+mc9jsjjlxFZ6vx8wU 7MUuLVMYldRcJ+0noTDJYSvLOo0tE0kxArCI0uTDggJ+l6QlddE7lkWN2zzAU5qBJsWZ SvYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=ora5YMTIJrOVD6HJjWi6K6iS3I1gAeS+0oaXZhpTQUs=; fh=KJqbGoqY250Tjp1IoJ4/nMPGgzk4wqj0kX2kDwZjgck=; b=NkPUtCHXuzx0qngubweqs2Bxeh31+idafvB4VjLZvYIkf7KkEJ2RW4NLAmK9oAUerZ yyvcZvrvzZwiAmbn68/0M8lcqHZeX0+zJDvPxDAf1Td40+Tz7gZiK1gqJGlTajwW8uTf ppK6b4ae2Y9EPTZQP3oZ15XlxlUR41DZ0f/DRKtsmXawYJfocJzPH5t/ujl1caxYRc+5 /mLl+KOdPxizoLQr/lGhDaByL1bdtulK+Ft7GupbSKD8LYf9UUgmR2qYtq9RXoj/AZih uG/h4FquzCa8YVoU8rsCJh8pgKUICz5Frv0+w8nffkh2KeDtKudBGaxccBxCnz9x9cNt 0WUg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=percona.com; s=google; t=1775036129; x=1775640929; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ora5YMTIJrOVD6HJjWi6K6iS3I1gAeS+0oaXZhpTQUs=; b=Hd/QbTA8peC5VSgeKAwjpE+TsnmtfdOt1afX/7iHwbkwJRuxuL23FMeN9XSzDuc2o+ xR61vu3FROA1TIUfeFagZ9Gn2Oa+87eshNRnWxdb1+ABxX1mrQ7zZW/kY8IklGt2T/48 CjGV2pBk1KQoKPnAzhM6wqeFCjYDeMmNFWbRI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775036129; x=1775640929; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ora5YMTIJrOVD6HJjWi6K6iS3I1gAeS+0oaXZhpTQUs=; b=LQjrGiWK3tezDF31ue9naFYVS670pWNTin7V/WZTBXXv4jYkjdCzYE6oTxnllEdB0M LbC9SOfnAXPDV/Ue+fx9CyIYzbJo84tdoHHcM1A/kJpmnhJtjXzCRhwdWAo4lSX5VUrV OSWMVPGJReiKVXTADLCCmf3ryFZ1lNDdcPXtJSOkeCvOl3/7+EPXnP7U1o5dw62gdXA9 ReADsNZg2xLptzif0bvc4YnFrSz3zMzixyzbO2EVdtsdt44zAnbQl/M+uaA1XmJFNKJE zIWqvO7W4Xppf81vigvYdbGF7Ic3t3z4TdGY4I1UhflPkUKNXqznKZBubJwZcnH2YfPN Qz+w== X-Gm-Message-State: AOJu0YxN+QjWNOngdFPkKNuodNq+FWWiINx+Jbh5I7qTu+G3DpazBetK 9nlMs2TxYyAvCtOA9I4XaMmAZYXWnUhO8c5j4JOGS+MtBdBTKUdm65pX3pzrSELBUPdvUPNjpBv 0qPOmndlVWOCuU+0YjYvCMjHSbE+L17OiZv8PPVegYPCkrkGMiG5Hy86uD5WxXh8FfpQvtnmk9y Zyu0YkL9zryP8Jfe7YBJ+nfshNN50XUzr7dC4kjaW+dVMVeNEeXRlQ6qAnHR9bwnmZWntuJSssc Xtal+XGXQpdIn3Wjeo0QCLIkK8FQbDWShB5n9mGJ5fq4F97hCFOEW8dH2zDSd3GyOw= X-Gm-Gg: ATEYQzzVXBQVNZBKJWc1zsQsgbfO0mYt8UmUXB9alLQkzw4YPipiiiNt3endWUyECRf 4BtOizsQCzgCZ1r5irG7zEyPsP46unhAJL6Sh4BzAAooJGSe+wY0tiQLomECzwyPFsimfl3Al/A qqUuMVU2y8nnKBDpFYf8eXX9yIWhjA1cmOzYVG00/XU7hE88xxi4eXigNAvq3ZIxsdSOb/TKPFz xYdiusoanuVHkIoJ3J/DrQkN3liTb27BbE+hkKV3E73r6TkZjzuZGeT8Au6GHFwP9CmalhhTK1t Bwm0kPQyYHWiOCU7f6pfO8I5Ze2JoTfk8z8tb+DMHQAYP9u8/A1CUUmPr0800wlfSSs+ X-Received: by 2002:a05:690c:102:b0:79d:67bd:53f9 with SMTP id 00721157ae682-7a20f8efb76mr30258687b3.4.1775036128672; Wed, 01 Apr 2026 02:35:28 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Zsolt Parragi Date: Wed, 1 Apr 2026 10:35:18 +0100 X-Gm-Features: AQROBzAqTTpeaSz3L7ZNBlZ_PcEmPV8Tdu8Z9x3NUXJunHnXRC3asFSiGzFtYm4 Message-ID: Subject: Re: [oauth] Split and extend PGOAUTHDEBUG To: Jacob Champion Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" X-CLOUD-SEC-AV-Sent: true X-CLOUD-SEC-AV-Info: percona,google_mail,monitor X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > To keep the brainstorming going, I chose the following for v3, but > they're by no means settled: ... The names look good. I'm still not 100% sure about plugin-errors, but since we already have debug in the variable name, it might be okay. +/* all safe and unsafe flags, for the legacy UNSAFE behavior */ +#define OAUTHDEBUG_UNSAFE_ALL ((uint32) ~0) The name of this variable is a bit confusing, it's not only about unsafe settings. I understand why you added the unsafe to it, but before checking the value/comment I thought this will be the bitmask of all unsafe options. On the other hand I don't have a better idea other than simply using ALL. +oauth_get_debug_flags(void) +{ + uint32 flags = 0; + const char *env = getenv("PGOAUTHDEBUG"); ... One of the reasons why I implemented this in a C file is because I wanted to avoid reparsing and warning spam/duplication. Reparsing shouldn't be a major issue since this is a debug feature, but this approach causes a warning to print twice in a few corner cases. That's probably acceptable, the issue is limited in the current code, but I wanted to mention it as a limitation, as I don't think there's a good way to fix this without a .c file.