public inbox for [email protected]  
help / color / mirror / Atom feed
PostgreSQL Account and Object Timestamp Logging
3+ messages / 3 participants
[nested] [flat]

* PostgreSQL Account and Object Timestamp Logging
@ 2025-09-19 02:55  張宸瑋 <[email protected]>
  0 siblings, 2 replies; 3+ messages in thread

From: 張宸瑋 @ 2025-09-19 02:55 UTC (permalink / raw)
  To: [email protected]

Hello everyone,

I would like to ask if there are any built-in features or extensions in
open-source PostgreSQL—aside from the AUDIT mechanisms—that allow us to
query or log the creation time of user accounts and database objects.

The reason for this inquiry is that while audit logs do capture these
events, they may eventually be rotated out or removed due to housekeeping
policies. Having a dedicated table or view to permanently record the
creation or modification time of accounts and objects would be very helpful
for audit and security compliance purposes.

Thank you in advance for your insights!


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: PostgreSQL Account and Object Timestamp Logging
@ 2025-09-19 03:07  David G. Johnston <[email protected]>
  parent: 張宸瑋 <[email protected]>
  1 sibling, 0 replies; 3+ messages in thread

From: David G. Johnston @ 2025-09-19 03:07 UTC (permalink / raw)
  To: 張宸瑋 <[email protected]>; +Cc: [email protected] <[email protected]>

On Thursday, September 18, 2025, 張宸瑋 <[email protected]> wrote:
>
>
> I would like to ask if there are any built-in features or extensions in
> open-source PostgreSQL—aside from the AUDIT mechanisms—that allow us to
> query or log the creation time of user accounts and database objects.
>
>
That information is not captured/retained by a PostgreSQL cluster.  See
many previous discussions from the mailing list archives.

David J.


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: PostgreSQL Account and Object Timestamp Logging
@ 2025-09-19 08:13  Dominique Devienne <[email protected]>
  parent: 張宸瑋 <[email protected]>
  1 sibling, 0 replies; 3+ messages in thread

From: Dominique Devienne @ 2025-09-19 08:13 UTC (permalink / raw)
  To: 張宸瑋 <[email protected]>; +Cc: [email protected]

On Fri, Sep 19, 2025 at 4:56 AM 張宸瑋 <[email protected]> wrote:
> *log* the creation time of user accounts and database objects.

Yes, indirectly, via event triggers:
https://www.postgresql.org/docs/current/event-trigger-matrix.html

But that's specific to a DB, does [NOT fire for CREATE USER/ROLE][1],
only some objects,
and unfortunately, must be SUPERUSER to install it, DB OWNER is not
enough (pity...).

[1]: https://www.postgresql.org/docs/current/event-trigger-matrix.html






^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2025-09-19 08:13 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-09-19 02:55 PostgreSQL Account and Object Timestamp Logging 張宸瑋 <[email protected]>
2025-09-19 03:07 ` David G. Johnston <[email protected]>
2025-09-19 08:13 ` Dominique Devienne <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox