O'Reilly logo

PostgreSQL 9 Administration Cookbook - Second Edition by Simon Riggs, Gianni Ciolli, Hannu Krosing, Gabriele Bartolini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Auditing data changes

This recipe provides different ways to collect changes to data contained in the tables for auditing purposes.

Getting ready

First, you must take the following decisions:

  • Do you need to audit all changes or only some?
  • What information about the changes do you need to collect? Only the fact that the data has changed?
  • When recording the new value of a field or tuple, do you also need to record the old value?
  • Is it enough to record what user did the change, or do you also need to record the IP address and other connection information?
  • How secure (tamper-proof) must the auditing information be? For example, does it need to be kept separately, away from the database being audited?

Based on answers to these questions, you can select the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required