Skip site navigation (1) Skip section navigation (2)

Re: Tuple changes from relfilenodes

From: Bill MacArthur <webmaster(at)dhs-club(dot)com>
To: lukasz(dot)brodziak(at)hotmail(dot)com, pgsql-admin(at)postgresql(dot)org
Subject: Re: Tuple changes from relfilenodes
Date: 2010-08-27 17:11:47
Message-ID: 4C77F1D3.1090801@dhs-club.com (view raw or flat)
Thread:
Lists: pgsql-admin
>> Are you looking for statistics or the actual prior versions of
>> rows?
>
> I'm looking for actual versions of row data. What I want to
> achieve as a final result is a kind of data change history.

We just use ON DELETE rules on the tables where we want to maintain a history. In most cases, we just copy the old record to the archive table which has an additional timestamp column with a default of NOW() to indicate the date of archival. In one case, where the table schema is large, changes are "frequent" and the changes are often minimal, we only archive a small subset of data based on what is changing. If the changes affect columns outside of the small subset, then we archive the whole record.

Bill MacArthur
  

In response to

Responses

pgsql-admin by date

Next:From: Bill MacArthurDate: 2010-08-27 17:17:25
Subject: Re: Tuple changes from relfilenodes
Previous:From: Lukasz BrodziakDate: 2010-08-27 17:09:08
Subject: Re: Tuple changes from relfilenodes

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group