Re: [HACKERS] Too many duplicated condition query return wrong value

2015-09-07 Thread Atsushi Yoshida
Thank you for your answer Jeff. I have fixed it. >> What type of index is it? (I'm now guessing btree, but maybe not)? Is >> there a defined time window during which you know the corruption occurred? >> If so, do you still have the server logs from that time window? The WAL >> logs? Its o

Re: [HACKERS] Too many duplicated condition query return wrong value

2015-09-06 Thread Jeff Janes
On Thu, Sep 3, 2015 at 10:55 PM, Atsushi Yoshida wrote: > >> Can you give an "explain (analyze, buffers)" for each query? Maybe > you have a corrupted index, and one query uses the index and the other does > not. > > > > > > Index Scan using idx_attend_00 on attend (cost=0.29..627.20 rows=172

Re: [HACKERS] Too many duplicated condition query return wrong value

2015-09-04 Thread Atsushi Yoshida
>> Can you give an "explain (analyze, buffers)" for each query? Maybe you >> have a corrupted index, and one query uses the index and the other does not. > explain (analyze, buffers) SELECT "attend"."lid", "attend"."status" FROM > "attend" WHERE "attend"."sid" = 325 AND "attend"."lid" IN ('AB

Re: [HACKERS] Too many duplicated condition query return wrong value

2015-09-03 Thread Jeff Janes
On Thu, Sep 3, 2015 at 5:14 AM, Atsushi Yoshida wrote: > Hi. > > I cought a strange result. > I execute such query. > > > SELECT "attend"."lid", "attend"."status" FROM "attend" WHERE > "attend"."sid" = 325 AND "attend"."lid" IN ('ABF0010', 'ABF0010', > 'ABF0010', 'ABF0010', 'ABF0010', 'ABF0010',

[HACKERS] Too many duplicated condition query return wrong value

2015-09-03 Thread Atsushi Yoshida
Hi. I cought a strange result. I execute such query. > SELECT "attend"."lid", "attend"."status" FROM "attend" WHERE "attend"."sid" = > 325 AND "attend"."lid" IN ('ABF0010', 'ABF0010', 'ABF0010', 'ABF0010', > 'ABF0010', 'ABF0010', 'ABF0010', 'ABF0010', 'ABF0010', 'ABF0010', 'ABF0010', > 'ABF001