From: Bill MacArthur <webmaster@dhs-club.com>
To: lukasz.brodziak@hotmail.com
To: pgsql-admin@postgresql.org
Subject: Re: Tuple changes from relfilenodes
Date: Fri, 27 Aug 2010 13:17:25 -0400
Message-ID: <4C77F325.8000204@dhs-club.com> (raw)
In-Reply-To: <4C77A7E40200002500034D33@gw.wicourts.gov>
References: <SNT125-W2321CA0976D766C95D975DF9860@phx.gbl>
<4C7776760200002500034D06@gw.wicourts.gov>
<SNT125-W9E0FB58245FF91EE836BAF9860@phx.gbl>
<4C77A7E40200002500034D33@gw.wicourts.gov>
>> 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
* Make that ON DELETE and ON UPDATE :)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: webmaster@dhs-club.com, lukasz.brodziak@hotmail.com
Subject: Re: Tuple changes from relfilenodes
In-Reply-To: <4C77F325.8000204@dhs-club.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox