Re: deadlock in single-row select-for-update + update scenario? How could it happen?

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: deadlock in single-row select-for-update + update scenario? How could it happen?
Date: 2014-08-22 17:29:14
Message-ID: 53F77DEA.7020104@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/22/2014 9:29 AM, hubert depesz lubaczewski wrote:
> select * from table where pkey = <value> limit 1 for update;

why is there a limit 1 in there? pkey=somevalue should only return a
single row. if it DID return multiple rows, you don't have an ORDER
BY, so the limit 1 would be indeterminate.

--
john r pierce 37N 122W
somewhere on the middle of the left coast

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Daniele Varrazzo 2014-08-22 17:34:12 Constraint exclusion on tables partitioned over range types
Previous Message Adrian Klaver 2014-08-22 17:20:10 Re: deadlock in single-row select-for-update + update scenario? How could it happen?