Re: Tracking role modification timestamps in pg_authid / pg_roles

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>, Gabriele Bartolini <gabriele(dot)bartolini(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Tracking role modification timestamps in pg_authid / pg_roles
Date: 2026-08-21 11:05:15
Message-ID: 9a75f8e0-9078-4637-89ef-96580985d37b@dunslane.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2026-08-21 Fr 12:40 AM, Andres Freund wrote:
> Hi,
>
> On 2026-08-21 13:07:42 +1000, Gabriele Bartolini wrote:
>> I'd like to propose adding a small column to pg_authid (rollastupdated
>> timestamptz), that records when a role was last created or altered, and get
>> feedback on the idea before polishing it for a commitfest (a working
>> prototype is attached).
>>
>> Why?
>> Tools that manage PostgreSQL roles declaratively all reconcile in the same
>> way: given a desired set of roles and attributes, make the live cluster
>> match it, repeatedly and idempotently.
> My question is why this is needed for pg_authid and not any of the other
> catalogs? Adding one-off code for different catalogs one-by-one would ... not
> be likely to result in good code.
>

Is the suggestion to track modification times for all catalog objects?
I'm not objecting, but that does seem like a pretty substantial change.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2026-08-21 11:28:22 Re: Possible race condition in pg_basebackup
Previous Message Tomas Vondra 2026-08-21 11:01:25 Re: toast table corrupted by vacuum - missing chunk number 0 for toast value