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

Re: FOR SHARE vs FOR UPDATE locks

From: Michael Paesold <mpaesold(at)gmx(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: FOR SHARE vs FOR UPDATE locks
Date: 2006-12-01 07:16:41
Message-ID: 456FD6D9.9020102@gmx.at (view raw or flat)
Thread:
Lists: pgsql-docspgsql-hackers
Tom Lane wrote:
 > I'm tempted to just error out in this scenario rather than allow the
 > lock upgrade.  Thoughts?

Although this seems to be a technically hard problem, the above sentence 
does not sound like the PostgreSQL way to solve problems (rather like 
MySQL). ;-)

Now seriously, isn't this a perfectly feasible scenario? E.g. the outer 
transaction acquires a shared lock because of foreign key constraints, and 
the sub transaction later wants to update that row?

Best Regards
Michael Paesold

In response to

Responses

pgsql-docs by date

Next:From: Tom LaneDate: 2006-12-01 07:46:59
Subject: Re: FOR SHARE vs FOR UPDATE locks
Previous:From: Robert TreatDate: 2006-12-01 00:30:31
Subject: Re: DTrace docs, Open Items and Performance

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-12-01 07:46:59
Subject: Re: FOR SHARE vs FOR UPDATE locks
Previous:From: Jim NasbyDate: 2006-12-01 00:40:48
Subject: Re: [GENERAL] Allowing SYSDATE to Work

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