Re: Pasword expiration warning
Gilles DAROLD <gilles@darold.net>
From: Gilles Darold <gilles@darold.net>
To: Japin Li <japinli@hotmail.com>
Cc: Yuefei Shi <shiyuefei1004@gmail.com>,
songjinzhou <tsinghualucky912@foxmail.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>,
Andrew Dunstan <andrew@dunslane.net>, "Bossart, Nathan"
<bossartn@amazon.com>, Tom Lane <tgl@sss.pgh.pa.us>,
liu xiaohui <liuxh.zj.cn@gmail.com>, Steven Niu <niushiji@gmail.com>
Date: 2026-01-09T11:27:59Z
Lists: pgsql-hackers
Attachments
- v11-0001-Add-password_expire_warning-GUC-to-warn-clie.patch (text/x-patch) patch v11-0001
- v11-0002-Add-TAP-test-for-password_expire_warnin.patch (text/x-patch) patch v11-0002
Le 09/01/2026 à 10:04, Japin Li a écrit :
> Hi, Steven
>
> Thanks for the review.
>
> On Fri, 09 Jan 2026 at 07:36, Steven Niu <niushiji@gmail.com> wrote:
>> Hi, Jiapin,
>>
>> I reviewed the v9-0002-Add-TAP-test-for-password_expire_warning.patch
>> and here are my comments:
>>
>> 1. I think we should add tow more cases. One case is for the feature is disbaled. And another is for no warning when >1d remaining.
> Add in v10.
>
>> 2. The modification to pg_hba.conf is unnecessary as the default pg_hba.conf generated by initdb already allows local connections with appropriate methods.
>> unlink($node->data_dir . '/pg_hba.conf');
>> $node->append_conf('pg_hba.conf', "local all all scram-sha-256");
> Yes, it allows local connections, but they are always in trust mode, so no
> password is required (or used).
>
>> 3. Make the expected string to be more exact.
>> qr/your password will expire in/);
>> -->
>> qr/your password will expire in 1d/);
>>
> Fixed. PFA.
>
> v10-0001 - No changes.
> v10-0002 - Address review comments.
>
Here is a v11 version of the patch.
v11-0001 - fix a miss on the typo fixes ( s/expire/expires/ in GUC
description ) and add your name in the authors list.
v11-0002 - Add a test with Infinity in VALID UNTIL value.
--
Gilles Darold
http://hexacluster.ai/
Commits
-
Add password expiration warnings.
- 1d92e0c2cc47 19 (unreleased) landed