Re: [HACKERS] postgres inode q's
Bernard Adrian Frankpitt <frankpit@pop.dn.net>
From: Bernard Frankpitt <frankpit@pop.dn.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: bingram@cpsgroup.com, pgsql-hackers@postgreSQL.org
Date: 1999-10-23T17:49:16Z
Lists: pgsql-hackers
Tom Lane wrote: > > ................ So, as soon as any backend > checks a tuple and sees that its inserting transaction did commit, > it rewrites the tuple with a new state "INSERT KNOWN COMMITTED" (which > is represented by inserting XID = 0 or some such). ......... > The way concurrency is supported in PostgreSQL is really cool, and I think not widely understood. The tuple uses flags stored in the t_infomask field of the HeapTupleHeader structure to 'cache' the status of the creating and deleting transactions for each tuple. Check out backend/utils/time/tqual.c and include/utils/tqual.h for the details of the algorithms. (Not recommended if you have been drinking at all) Ullman "Principles of Database and Knowledge-Base Systems, Vol 1" Has a pretty good discussion of time based and lock based schemes for concurrency control. Bernie Frankpitt