Re: New feature request for adding session information to PostgreSQL transaction log - Mailing list pgsql-hackers

From Tom Lane
Subject Re: New feature request for adding session information to PostgreSQL transaction log
Date
Msg-id 2741541.1737306125@sss.pgh.pa.us
Whole thread Raw
In response to New feature request for adding session information to PostgreSQL transaction log  (Sumanth Vishwaraj <sumanth.vishwaraj@oracle.com>)
Responses Re: [External] : Re: New feature request for adding session information to PostgreSQL transaction log
Re: New feature request for adding session information to PostgreSQL transaction log
List pgsql-hackers
Sumanth Vishwaraj <sumanth.vishwaraj@oracle.com> writes:
> We would like PostgreSQL to store the details of who made the change (user/session) information in the transaction
log.

You can build that yourself, typically by adding a trigger that stores
the value of "current_user" into inserted/updated rows.  (If you want
to also track deletions, a separate audit log table would work
better.)  The event-trigger feature might also be useful.

It's unlikely that we'd consider implementing such functionality at a
lower level, because these sorts of requirements always come with an
array of application-specific details about what is to be logged.
It would be impractical to satisfy all such cases in one implementation.
There would also be concerns about imposing overhead on users who
have no need for such a feature.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Additional comments around need_escapes in pg_parse_json()
Next
From: Andres Freund
Date:
Subject: Re: Old BufferDesc refcount in PrintBufferDescs and PrintPinnedBufs