Thread: running transactions in postgresql

running transactions in postgresql

From
"Jenny -"
Date:
<div style="background-color:"><div>hi,</div><div> Iam working on project that deals with analyzing the locking
mechanismin postgresql. </div><div>I started a transaction in postgresql with 'begin work;' and noticed that even
thoughno locks have been taken yet, there still exists data in LockData datastructures that indicates that the
transactioni just started running is waiting for a lock.Does anyone know why this happens? I f not , could someone
guideme to the appropriate site or mailinglist where my question can be answered.</div><div>thank
you</div><div>Jenny</div></div><brclear="all" /><hr />Protect your PC - <a
href="http://g.msn.com/8HMEENUS/2755??PS=">Clickhere</a> for McAfee.com VirusScan Online  

Re: running transactions in postgresql

From
Alvaro Herrera
Date:
On Tue, Jul 08, 2003 at 07:41:48AM -0700, Jenny - wrote:

> [unquotable HTML, please post only text/plain!]

At transaction start
(src/backend/access/transam/xact.c::StartTransaction()),
src/backend/storage/lmgr/lmgr.c::XactLockTableInsert() is executed,
which takes a special lock on a ficticious XactLockTableId.

Maybe that's what you are seeing?

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Uno puede defenderse de los ataques; contra los elogios se esta indefenso"