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 1vipJE-00GP18-1n for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Jan 2026 07:40:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vipJD-00BmI9-1y for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Jan 2026 07:40:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vipJD-00BmI0-0t for pgsql-hackers@lists.postgresql.org; Thu, 22 Jan 2026 07:40:51 +0000 Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vipJA-001jOB-2O for pgsql-hackers@postgresql.org; Thu, 22 Jan 2026 07:40:50 +0000 Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-79274e0e56bso7091387b3.0 for ; Wed, 21 Jan 2026 23:40:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769067649; cv=none; d=google.com; s=arc-20240605; b=HTlOrk75PNJQkBFMXvPyqWr0XWbxATcNnshZWSVKVxgHkhyT+l/a58QtqYpGky1CoR 63dfR/XcniRWkGP8u15IRzW8Uqux4Mb19UJddpJlhnQe7/ezG6gcalde3IB5LQG0D4ZD baQEXdrVPZP1KO4q2jXgJmQHIUQdIbkojsDYtLmlACtZWC3zm28MJjpLwkc0A96kbSSN OlDMJ/2AY0X0KDSiPLxw89PRbPvD5ISZHFAwM/OMOBQGUbfDxAlpUd5x96U3R6kjD+UV 79jtsQi4Dmjp3zG+b/gV7igXmoX8u33F0MOX7zg2T54+Qt8IZM05WIE1FeUHuVzdwpuC w02Q== 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=BqJ0luK0Ed09wrcLRbvuk2gRNexuQI+SlVKgX53b/78=; fh=diUsz2IUSlWdaeumurCAbuPMVDPVzZzp2WqxpHwyo88=; b=Pxh5KucdJxCV0u6nYLflixcknCixhLyUopiCYiw0LQmOL3bXlBORQ3IKS8tFEP5t21 AZniHLwgI7TpEJh/5LQx23NYGsDXpTfQAxcJRUdrEeD41Xs/iavSZQictmnflT2AbEvF nOhosrVVQaAP41GIc2EffE3l7D2MdrDhsjoWr+IOcT4SANKThrtkb/qZmXtwmXd0i1dK Gh0sjz9qGXBVhoZvdrK60UEd+nXtOnZd9CvyBhxLi2+/OqTdLUN1W11H96MqKW713X3D soNNA8DKOAUbZ/liqXIwfalNZwG7NrCdiff8bflCRgcY1/W40TO31XxWdc7Gr95Yyt5y 7EZw==; darn=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=1769067649; x=1769672449; darn=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=BqJ0luK0Ed09wrcLRbvuk2gRNexuQI+SlVKgX53b/78=; b=KE+gSwQpaiK2LlAFmt25eHEsc8HqrZoJ8apfHqDMrAzsKjEveIKvoAbaoe+qBlzFW/ ZIjNCCZ80KOU6t51LZDcy5eNsoRlRxIRtZsn6m8WkNBEBjWVTtRQ3HwJaXrjEwlxRPVz WpGisMG3lptGWOmtTxY4XuUxHUmIYaK6QniAI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769067649; x=1769672449; 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=BqJ0luK0Ed09wrcLRbvuk2gRNexuQI+SlVKgX53b/78=; b=CNUwy4VvkF8npymf4CzZPRSHimtacubaagahhudYtisatp8JzM3TD51hq6uCjjw3bI 7mSFkZhdyK3F8ke8BBLk3iMQ72LedAb6KajgLoMPWtNYyZUA4dKcgpG7LsERGhGqt9BI eslIV/IdJ0TbGgZn/q2fn6hJyZf61x5tXubs+N57jaAhEN8FUQ5rbDnEDFHMclRzqzAQ X7YWU3DTUqegEkZnviLbK7xLhp/jnyNuwvURdOtneywDtnRoPjBQkB4yiBRrSUrvK10v XOLC7+vTIQJldwLO9x7zxT/Ne8cyaGzpG9PH32EU9Hp1KnM+OA0iTYDj+cfaLPYIvL3Y mVpQ== X-Forwarded-Encrypted: i=1; AJvYcCWlvUYmCvrBSdgh1S7d4K2XVV7w4rYQSBB0Ym/VatSsEff8tnUsbWM1vmhlZcpJkoeNGIIC6FADe8NQiDKK@postgresql.org X-Gm-Message-State: AOJu0YyCQ9fuKxdUWvdh+Cxc4kJaxaiYBy1CBFsJg5GJdsjm31F23Rzn piexH/LI8k+3EZTcR64U/SG2qUzGY0jxVsejQeaLey+pMp0tdyaNbECpBDSUJW3k1un60DTAVoX 6UKoQzPI6AGTYds6YIOsZEPxqC6NI6sXWDd7Zq6dkiv7kWfUB9MDbZWvHseTV2fdgEVYfcVNSvM NPaO9NG0i9/k7uS7vLQgrhHS2s9yrbISZ8AFDjQ/Ml6ND4+M9h7YYT2GGchwGxB2BnMrcfVsucs wQHSf+1SONP+DTmKQIuOMo5MdNG3Ox+xdMSZg9i4wHXISbS+v0= X-Gm-Gg: AZuq6aK16Fp0ObMHJLfwvbhxhBwu3g8haBwIgbKay3TYVLqWefkXHoWJuhq+B+zbfjj PXbd+Qkhm38WKJEM3snb7donwWiAUYUUoXU3ecMjyjkamgzVEcYljnFtD7lzkxefQR0SN4mD/K6 J6FBMwFdM/KW7Q1tXPNaXx8YC9SkHcXPGf4o1TPV4cXHzWxGtGyNmwNCjsrok6SFRPhthhEj2uW VpOoIzDNCQE6YJOvpVfipopsvZOK1usmX6upiD8npf7sHbUNSrN/rFBcT3y0B8Hr0I0sqx6LWQ6 s7X8/kB5R/GgRewkgKyPCJC9fxLtdmd7EBDUX1KgTATU0cK1PXDxIytO3HXJn56OJzg= X-Received: by 2002:a05:690c:6609:b0:793:af69:83ae with SMTP id 00721157ae682-7940a0e7cbfmr66702677b3.14.1769067648628; Wed, 21 Jan 2026 23:40:48 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Zsolt Parragi Date: Thu, 22 Jan 2026 07:40:38 +0000 X-Gm-Features: AZwV_Qj6VngrXhwiroXeez_yU0ywNHz4bg1XxtDymDP9gLD-romoBKG9fQs9q-k Message-ID: Subject: Re: Periodic authorization expiration checks using GoAway message To: Ajit Awekar Cc: Jacob Champion , Jelte Fennema-Nio , Hannu Krosing , PostgreSQL-development , Dave Cramer , Heikki Linnakangas 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 Hello! > Done. I have modified the condition check so as it will not impact users > having rolvaliduntil to NULL. Thanks! After one more look at this, shouldn't we refresh the cache if AuthCheckNeeded, regardless of the valid until timestamp value? (for example by moving the >0 condition to the inner if) Consider the following scenario: 1. user logs in, without a valid until date set 2. valid until is set to something 3. existing session started in 1 will never be terminated postgres.c:5368 - I missed this in my previos review, the error message should start with a lowercase character. > This patch introduces a mechanism to address the security issue of stale, > authorized connections persisting beyond their validity period. . postgres.c:5326 - if the user was dropped, but the connection is still active, the patch silently ignores it. That matches the current behavior of postgres, but is that the expected behavior in the context of this patch?