Re: a few questions (and doubts) about xid

From: Luca Ferrari <fluca1978(at)infinito(dot)it>
To: pgsql-general(at)postgresql(dot)org
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>
Subject: Re: a few questions (and doubts) about xid
Date: 2007-08-01 11:53:43
Message-ID: 200708011353.43872.fluca1978@infinito.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Edward Macnaghten 2007-08-01 12:17:11 Re: Linux distro
Previous Message paolo 2007-08-01 11:29:02 Linux distro