From: | Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com> |
---|---|
To: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: ctid access is slow |
Date: | 2005-08-24 01:42:33 |
Message-ID: | 20050824014233.2902.qmail@web34206.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
--- "Jim C. Nasby" <jnasby(at)pervasive(dot)com> wrote:
> On Wed, Aug 24, 2005 at 09:26:10AM +0930, Jeff
> Eckermann wrote:
> > The ctid value can be useful in a multi user
> application, to check whether a
> > record has been changed by another user, before
> committing changes.
> > Whenever a record is updated the ctid value will
> be changed, so by storing
> > the ctid value when first fetching the record,
> that can be compared with the
> > current ctid value before doing the update.
>
> I believe that's not necessarily true. If you select
> a tuple and it's
> ctid and it's updated more than once with a vacuum
> in-between I believe
> it could end up back in the same position, which
> would mean the same
> ctid.
True. But the probability of that happening would
generally be low enough not to bother the designers of
most applications.
> --
> Jim C. Nasby, Sr. Engineering Consultant
> jnasby(at)pervasive(dot)com
> Pervasive Software http://pervasive.com
> 512-569-9461
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | wolverine my | 2005-08-24 02:10:55 | ERROR: database is being accessed by other users |
Previous Message | Jim C. Nasby | 2005-08-24 01:11:49 | Re: ctid access is slow |