Re: question on audit columns

From: Tim Clarke <timc(at)minerva(dot)info>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Khan Muhammad Usman <usman(dot)k(at)bitnine(dot)net>, yudhi s <learnerdatabase99(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: question on audit columns
Date: 2024-09-04 14:48:19
Message-ID: LO4P123MB4671919E3F0E6914264CEA58A39C2@LO4P123MB4671.GBRP123.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> On 9/4/24 06:17, Khan Muhammad Usman wrote:
> > Yes this would be the better approach.
>
> 1) Except the overhead is now shifted to the application, which may or
> not be better. You are also moving the audit responsibility to the
> application and the application maintainers and making it application
> specific. If a new application/client starts hitting the database and it
> did not get the memo about the audit fields they won't be filled in.
>
> 2) I would recommend setting up a some realistic tests and see if the
> overhead of the update triggers would be a concern.
>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com

If it helps, we implemented a trigger based audit system 20 years ago. It both creates a separate inviolate audit table record and updates the record being changed with a timestamp and a userid of last change. We've not regretted it and moderate hardware deals well with the overhead (500+ table database, 80+ concurrent users, 18 million audit records a month).

--
Tim Clarke MSc, BSc (Hons), MBCS
IT Director
Direct: +44 (0)1376 504510 | Mobile: +44 (0)7887 563420
[https://i0.wp.com/www.manifest.co.uk/wp-content/uploads/2022/12/Minerva-Analytics-Logo-PORTRAIT.png] [https://i0.wp.com/www.manifest.co.uk/wp-content/uploads/2022/12/esg_finalist.png]

Telephone: Witham: +44(0)1376 503500 | London: +44 (0)20 3009 0853 | Frankfurt: +49 (0)69 7191 6000 | Hong Kong: +852 5803 1687 | Toronto: +1 647 503 2848
Web: https://www.manifest.co.uk/

Watch our latest Minerva Briefings on BrightTALK<https://www.brighttalk.com/channel/18792/?utm_source=brighttalk-sharing&utm_medium=web&utm_campaign=linkshare>

Minerva Analytics Ltd - A Solactive Company
9 Freebournes Court | Newland Street | Witham | Essex | CM8 2BL | United Kingdom

________________________________

Copyright: This e-mail may contain confidential or legally privileged information. If you are not the named addressee you must not use or disclose such information, instead please report it to admin(at)minerva(dot)info<mailto:admin(at)minerva(dot)info>
Legal: Minerva Analytics is the trading name of: Minerva Analytics Ltd: Registered in England Number 11260966 & The Manifest Voting Agency Ltd: Registered in England Number 2920820 Registered Office at above address. Please Click Here https://www.manifest.co.uk/legal/ for further information.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-09-04 15:04:45 Re: Issue with Restore dump with plpythonu, plpython3u installed on postgres16
Previous Message Adrian Klaver 2024-09-04 14:36:31 Re: question on audit columns