Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 737D263442B for ; Fri, 27 Aug 2010 14:17:38 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 24997-03 for ; Fri, 27 Aug 2010 17:17:31 +0000 (UTC) X-Greylist: delayed 00:05:38.159523 by SQLgrey-1.7.6 Received: from mail.dhs-club.com (mail.dhs-club.com [208.69.229.2]) by mail.postgresql.org (Postfix) with ESMTP id BF711634244 for ; Fri, 27 Aug 2010 14:17:28 -0300 (ADT) Received: from [192.168.0.3] (hq.clubshop.com [208.78.129.189]) (authenticated bits=0) by mail.dhs-club.com (8.13.1/8.13.1) with ESMTP id o7RHHQBE003001 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 27 Aug 2010 13:17:27 -0400 Message-ID: <4C77F325.8000204@dhs-club.com> Date: Fri, 27 Aug 2010 13:17:25 -0400 From: Bill MacArthur User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: lukasz.brodziak@hotmail.com, pgsql-admin@postgresql.org Subject: Re: Tuple changes from relfilenodes References: , <4C7776760200002500034D06@gw.wicourts.gov> <4C77A7E40200002500034D33@gw.wicourts.gov> In-Reply-To: <4C77A7E40200002500034D33@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 208.69.229.2 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201008/252 X-Sequence-Number: 35501 >> 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 :)