From: | Bernard Frankpitt <frankpit(at)pop(dot)dn(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | bingram(at)cpsgroup(dot)com, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] postgres inode q's |
Date: | 1999-10-23 17:49:16 |
Message-ID: | 3811F51C.B884AC7D@pop.dn.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Aaron J. Seigo | 1999-10-23 17:54:40 | Re: [ADMIN] Re: [HACKERS] RFC: Industrial-strength logging (long message) |
Previous Message | Tom Lane | 1999-10-23 17:25:05 | Re: [HACKERS] RFC: Industrial-strength logging (long message) |