Subject: concurrency control structures in Postgres

From: "MARCIN JANUCHTA (P.445)" <[email-masked]>
Date: Fri, 22 Apr 1994 13:15:32 CET-0

I am supervising a project in extending Postgres to handle complex 
event detection, monitoring other systems (like Oracle and Novell 
netware) etc. It would be very valuable to provide a real-time
support for these tasks. First of all I need to adjust 
the concurrency control to be priority sensitive.
Does anybody have the documentation concerning the lock table 
structure and lock request/grant routines in Postgres code,
as well as the internal representation of transactions?
It is also very important to be able to abort a chosen transaction
by calling some "abort" function.

I hope that somebody (perhaps from the Postgres team) would be
so kind to enlighten me  (if it's not a kind of trade secret...). 
The documentation coming with the 4.1 or 4.2
does not cover the subject (except few lines at the end of am.ps).

Thank you very much in advance for your kind consideration.
Regards,

Marcin Januchta   ([email-masked], @pozn1v.tup.edu.pl)
Institute of Computing Science
Poznan Technical University
Poznan, Poland

---

From: [email-masked] (Paul M. Aoki)
Date: Mon, 25 Apr 94 19:37:29 -0700

> so kind to enlighten me  (if it's not a kind of trade secret...). 

if it were a trade secret, we wouldn't give away the source, eh? :-)

the very little i know about the lock manager i acquired from 
walking around with a TAGS-file.  unfortunately there isn't much
in terms of documentation.  there is a file
	src/backend/storage/lmgr/README
that was a first attempt by jeff meredith at explaining some concepts 
but it was never finished.  there are also some comments in the source
that explain a few things.  i believe the gray paper to which they
refer is:

%A J. N. Gray
%A R. A. Lorie
%A G. R. Putzolu
%A I. L. Traiger
%T Granularity of Locks and Degrees of Consistency in a Shared Data Base
%B Modelling in Data Base Management Systems
\fI(PROC IFIP Working CONF on Modelling in Data Base Management Systems, Freudenstadt, Germany, JAN 1976)\fP
%I North-Holland
%C Amsterdam, the Netherlands
%D 1976
%P 365-394
%O (Reprinted in: M. Stonebraker, \fIReadings in Database Systems, 2nd Ed.\fP, Morgan Kauffman, San Mateo, CA, 1993.)

(note that the recent gray/reuter book on transaction processing systems 
has an improved version of the same discussion.)
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  [email-masked]
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki

===============================================================================
    To add/remove yourself from the POSTGRES mailing list: send mail with 
    the subject line ADD or DEL to "[email-masked]"

    If this fails, send mail to "[email-masked]" and
    a human will deal with it.  DO NOT post to the "postgres" mailing list.
===============================================================================