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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-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

Browse pgsql-docs by date

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

Browse pgsql-hackers by date

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