Re: Getting acces to MVCC version number

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jean-Luc Lachance <jllachan(at)nsd(dot)ca>
Cc: pgsql-sql(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: Getting acces to MVCC version number
Date: 2002-09-20 21:23:32
Message-ID: 2566.1032557012@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-sql

Jean-Luc Lachance <jllachan(at)nsd(dot)ca> writes:
> How about making available the MVCC last version number just like oid is
> available. This would simplify a lot of table design. You know, having
> to add a field "updated::timestamp" to detect when a record was updated
> while viewing it (a la pgaccess).
> That way, if the version number do not match, one would know that the
> reccord was updated since last retrieved.

> What do think?

I think it's already there: see xmin and cmin. Depending on your needs,
testing xmin might be enough (you'd only need to pay attention to cmin
if you wanted to notice changes within your own transaction).

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2002-09-20 21:32:02 Re: Weird Trigger behaviour
Previous Message Glen Eustace 2002-09-20 20:59:22 Weird Trigger behaviour

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-09-20 21:32:18 Re: [PATCHES] to_char(FM9.9) bug fix
Previous Message John Buckman 2002-09-20 21:18:24 Lyris looking to help fix PostgresSQL crashing problems

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2002-09-20 21:55:30 Re: Performance w/ multiple WHERE clauses
Previous Message Neil Conway 2002-09-20 19:54:45 Re: Monitoring a Query