Re: Record creation date

From: ptjm(at)interlog(dot)com (Patrick TJ McPhee)
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Record creation date
Date: 2006-09-03 17:23:44
Message-ID: 12fm3t0l3que4b0@corp.supernews.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In article <44F6C908(dot)9080908(at)interactivegaming(dot)com>,
Rafael Barrera Oro <rbarrera(at)interactivegaming(dot)com> wrote:

% Hello everyone! i am checking a database due to some inconsintencies and
% i was wandering if its possible to find out the creation date of a
% record (using the oid, whatever...). Maybe i am saying something stupid
% (since i am no DB expert) so if this is the case, please point it out
% gently.

Whatever: xmin, xmax

These give the range of transaction ids over which the data in a row are
valid. If xmin is 2, it means the change was made long enough ago that
vacuum has frozen it to avoid transaction wrap-around (or that you ran
vacuum freeze). Otherwise, the xmin can be compared to the xmin of some
table with a timestamp to get the approximate time the record was last
changed.
--

Patrick TJ McPhee
North York Canada
ptjm(at)interlog(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bob Pawley 2006-09-03 21:24:41 Serial Updating
Previous Message mdean 2006-09-03 17:07:11 Re: [GENERAL] Thought provoking piece on NetBSD