Re: FOR SHARE vs FOR UPDATE locks

From: Michael Paesold
To: Tom Lane
Cc: Alvaro Herrera , pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: FOR SHARE vs FOR UPDATE locks
Date: 2006-12-01 07:16:41
Message-ID: [email protected]
Views: Whole Thread | Raw Message | 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