On 05/09/2014 08:36 AM, David G Johnston wrote:
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@xxxxxxxxxxxxxx
I ran Olivers pgbug.py against 9.0.17 and 9.3.4 and can confirm that I
see the same error. When I turned off autovacuum on 9.3 I did not see
the error which also confirms Olivers observation. Then I rewrote the
program as a plpythonu function and ran it in the 9.0.17 instance. It
ran successfully. It would seem this is either a psycopg2 issue or a
client/server connection problem. Still trying to figure where to go
from here.
#8464
http://www.postgresql.org/message-id/E1VN53g-0002Iy-Il@xxxxxxxxxxxxxxxxxxxxxxx
#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.
--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx