Re: Receiving many more rows than expected
| От | David G Johnston |
|---|---|
| Тема | Re: Receiving many more rows than expected |
| Дата | |
| Msg-id | 1399649764731-5803406.post@n5.nabble.com обсуждение |
| Ответ на | Re: Receiving many more rows than expected (Vincent de Phily <vincent.dephily@mobile-devices.fr>) |
| Ответы |
Re: Receiving many more rows than expected
Re: Receiving many more rows than expected |
| Список | pgsql-general |
Vincent de Phily wrote
> On Friday 09 May 2014 06:52:33 Adrian Klaver wrote:
>> On 05/09/2014 05:36 AM, Vincent de Phily wrote:
>> > On Friday 09 May 2014 07:01:32 Tom Lane wrote:
>> >> Vincent de Phily <
> vincent.dephily@
> > writes:
>> >>> In case it changes anything, this is the uncut (but still anonimized)
>> >>>
>> >>> function:
>> >>> query = """UPDATE foo SET processing = 't' WHERE id IN
>> >>>
>> >>> (SELECT id FROM foo WHERE processing = 'f' ORDER BY id
>> ASC
>> >>> LIMIT %d
>> >>>
>> >>> FOR UPDATE)
>> >>>
>> >>> RETURNING *""" % (conf_getint('DEFAULT', 'push_count',
>> >>> 5000),)
>> >>
>
> Thanks to all for taking an interest so far, this bug is... weird.
This seems to likely be the same, still open, bug reported previously:
No Number Assigned:
http://www.postgresql.org/message-id/CANCipfpfzoYnOz5jj=UZ70_R=CwDHv36dqWSpwsi27vpm1z5sA@mail.gmail.com
#8464
http://www.postgresql.org/message-id/E1VN53g-0002Iy-Il@wrigleys.postgresql.org
#8470 is referenced in the first thread as well...though that is
specifically a performance issue and not a query bug.
The recommended work-around is to move the sub-query using the "FOR UPDATE"
into a CTE.
David J.
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Receiving-many-more-rows-than-expected-tp5803179p5803406.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
В списке pgsql-general по дате отправления: