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

Re: Weird locking situation

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>,Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Weird locking situation
Date: 2003-10-02 14:47:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Tom Lane kirjutas N, 02.10.2003 kell 17:30:
> Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > What is going on here?  Surely getting a FOR UPDATE row lock should 
> > prevent another process getting an update lock?

> The behavior you describe would certainly be a bug, but you'll have to
> show a reproducible example to convince me it wasn't pilot error.  One
> idea that springs to mind is that maybe additional rows with id=1 were
> inserted (by some other transaction) between the SELECT FOR UPDATE and
> the UPDATE?

Perhaps he was looking for "key locking", so thet "select ... where
key=1 for update" would also prevent inserts where key=1 ?


In response to

pgsql-hackers by date

Next:From: Hannu KrosingDate: 2003-10-02 15:21:46
Subject: [Fwd: [Python-Dev] HP Test Drive systems]
Previous:From: Tom LaneDate: 2003-10-02 14:30:58
Subject: Re: Weird locking situation

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