[EMAIL PROTECTED] writes: > I'd find all this much easier to reason about if I understood how > the versions of a row are organized and accessed. How does postgresql > locate the correct version of a row?
It doesn't, particularly. A seqscan will of course visit all the versions of a row, and an indexscan will visit all the versions matching the indexscan key-column conditions. It's up to the "time qualification" tests (tqual.c) to accept only the version that is visible to your transaction. There are two or three implementation choices in the btree index routines that are intended to increase the chances that you'll hit the version you want sooner rather than later. But they're only heuristics. The bottom line is that we check all the versions till we find the right one. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org