Search Postgresql Archives

Re: a few questions (and doubts) about xid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 1 August 2007 Gregory Stark's cat, walking on the keyboard, 
wrote:

> You're right, the index contains pointers to *every* version of the tuple.
> So in a regular SELECT statement you don't need to look at the update chain
> at all.
>
> The main use of the update chain is when you want to perform an UPDATE or
> DELETE. In that case when you come across a record which is being updated
> by another transaction you must wait until that other transaction finishes
> and then update the resulting record (if you're in read-committed mode).

So, just to see if I got this, if the HeapTupleSatisfiesUpdate returns 
HeapTupleUpdated the chain update must be walked, right?


> > Third, I read about not valid MVCC snapshots (e.g., SnapshotNow). What is
> > the meaning of such "strange" snapshots? Because postgresql should always
> > guarantee at least read committed isolation, and thus this should be done
> > thru MVCC.....
>
> They're needed for things like the above UPDATE chain following

uhm...so first I get a tuple version using HeapSatisfiesUpdate, then if the 
tuple is HeapTupleUpdated I follow the update chain, then (may be) recheck 
with HeapTupleSatisfiesSnapshot with a SnapshotNow?? Something like this?

Thanks,
Luca




---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux