pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedGetting acces to MVCC version number
3+ messages / 2 participants
[nested] [flat]
* Getting acces to MVCC version number
@ 2002-09-20 18:22 Jean-Luc Lachance <jllachan@nsd.ca>
2002-09-20 21:23 ` Re: Getting acces to MVCC version number Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Jean-Luc Lachance @ 2002-09-20 18:22 UTC (permalink / raw)
To: pgsql-sql; pgsql-general@postgresql.org
Hi all developpers,
This is just a idea.
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?
JLL
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Getting acces to MVCC version number
2002-09-20 18:22 Getting acces to MVCC version number Jean-Luc Lachance <jllachan@nsd.ca>
@ 2002-09-20 21:23 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-09-23 15:47 ` Re: Getting acces to MVCC version number Jean-Luc Lachance <jllachan@nsd.ca>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2002-09-20 21:23 UTC (permalink / raw)
To: Jean-Luc Lachance <jllachan@nsd.ca>; +Cc: pgsql-sql; pgsql-general@postgresql.org
Jean-Luc Lachance <jllachan@nsd.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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Getting acces to MVCC version number
2002-09-20 18:22 Getting acces to MVCC version number Jean-Luc Lachance <jllachan@nsd.ca>
2002-09-20 21:23 ` Re: Getting acces to MVCC version number Tom Lane <tgl@sss.pgh.pa.us>
@ 2002-09-23 15:47 ` Jean-Luc Lachance <jllachan@nsd.ca>
0 siblings, 0 replies; 3+ messages in thread
From: Jean-Luc Lachance @ 2002-09-23 15:47 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql; pgsql-general@postgresql.org
That is great! Thanks for the info.
Tom Lane wrote:
>
> Jean-Luc Lachance <jllachan@nsd.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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2002-09-23 15:47 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-20 18:22 Getting acces to MVCC version number Jean-Luc Lachance <jllachan@nsd.ca>
2002-09-20 21:23 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-09-23 15:47 ` Jean-Luc Lachance <jllachan@nsd.ca>
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