Search Postgresql Archives

Re: Receiving many more rows than expected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 09 May 2014 16:53:49 Adrian Klaver wrote:
> On 05/09/2014 08:04 AM, Vincent de Phily wrote:
> > Thanks to all for taking an interest so far, this bug is... weird.
> 
> Yes weird. I tried to replicate your query to see if I could see
> anything similar. Tried it on 9.0.17 and 9.3.4 and could not get it to fail.
> 
> Did hard coding the limit value change anything?

I didn't hardcode the formating, just the test to display more debug when the 
bug happens:

> if rlen != curs.rowcount or rlen > 5000:
>    LOG.error("Fetched strange number of rows %d %d %s", rlen, curs.rowcount,
>              query)

And I got 2 instances of the bug during the weekend. Annoyingly, the debug 
showed as expected that rlen == curs.rowcount and that the query does ask for 
5000 records. So the querystring formating is apparently not at fault.

I also verified that none of the returned row ids overlapped (as expected).


So... Still not solved :(


I'm running out of ideas, but there are still two things I want to try:
* Logging all queries on the server side until I catch at least one instance
  of the bug. Is there a way to log the number of rows affected by a query ?
* Create a new cursor for each execute(), in case there somehow is some
  leftover state between two execute() calls. However I did a number of code
  changes today; they should be unrelated but I'll let them run on their own
  for a while to verify that.

-- 
Vincent de Phily



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux