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

Re: Understanding transactions

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Jonathan Gardner <jgardner(at)jonathangardner(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Understanding transactions
Date: 2004-06-04 01:18:55
Message-ID: 20040604011855.GB4742@dcc.uchile.cl (view raw or flat)
Thread:
Lists: pgsql-hackers
On Thu, Jun 03, 2004 at 05:38:21PM -0700, Jonathan Gardner wrote:

> Do you know of good resources on learning how transactions are implemented 
> in PostgreSQL? Should I just peruse the code? Which files are most 
> relevant?

backend/access/transam/xact.c (high level transaction status) and
backend/utils/time/tqual.c (low level tuple visibility test --- this is
hard to read and understand) and its respective header files are the most
relevant.  See also htup.h about "heap tuples," specially heap tuple
headers and the games with Xmin, Xmax, Cmin and Cmax.


Not sure about other literature.  Make sure you understand how MVCC
works before reading the code ...

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Y dijo Dios: "Que sea Satanás, para que la gente no me culpe de todo a mí."
"Y que hayan abogados, para que la gente no culpe de todo a Satanás"


In response to

pgsql-hackers by date

Next:From: Christopher Kings-LynneDate: 2004-06-04 01:45:57
Subject: Re: [PATCHES] dollar quoting
Previous:From: Gaetano MendolaDate: 2004-06-04 01:15:47
Subject: Re: PageGetMaxOffsetNumber on uninitialized pages

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