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

From: hubert depesz lubaczewski <depesz(at)gmail(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-general <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:35:14
Message-ID: CAKrjmhfQiyzK=UJVWObXdu4ero6KY9CcMSwkWnJ823fsqnyn7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Aug 22, 2014 at 7:29 PM, John R Pierce <pierce(at)hogranch(dot)com> wrote:

> 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.
>

leftover from some other thing.

depesz

In response to

Browse pgsql-general by date

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