Skip site navigation (1) Skip section navigation (2)

How is statement level read consistency implemented?

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: How is statement level read consistency implemented?
Date: 2008-04-22 10:41:08
Message-ID: fukfc4$d1n$ (view raw, whole thread or download thread mbox)
Lists: pgsql-general

in my office we were discussing the various ways statement level read consistency is implemented in different databases, namely Oracle and Postgres.

I am interested in the technical details on how PG determines that a block needs to be read from from "some other place than the data block" because another transaction has updated the data block.

I'm referring to the scenario that Tom Kyte describes here:
and how PG would detect that row 342,023 has been modified by a different transaction (and thus reads the correct value, unlike "the other database")

Oracle assigns a SCN (system change number) to each transaction, each block contains the SCN for which it is valid, any number higher than the current SCN indicates that the block has to be taken from the rollback segment.

How is this "test" implemented in Postgres? 
Does it have a similar concept (SCN) or does WAL imply a completely different way?

Thanks in advance


pgsql-general by date

Next:From: Pavan DeolaseeDate: 2008-04-22 10:57:17
Subject: Re: How is statement level read consistency implemented?
Previous:From: Albe LaurenzDate: 2008-04-22 10:30:12
Subject: Re: Postgres Encoding conversion problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group