[HACKERS] [Bug] Duplicate results for inheritance and FOR UPDATE.

2014-12-11 Thread Kyotaro HORIGUCHI
Hello, we found (and maybe fixed) two wrong behavior related to inheritance and FOR UPDATE. This report is about one of them. This behavior could be observed on master and back to 8.4 but 8.4 behaves a bit more funny. I haven't checked on 8.3. This issue is that some query returns duplicate rows

Re: [HACKERS] [Bug] Duplicate results for inheritance and FOR UPDATE.

2014-12-11 Thread Tom Lane
Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp writes: This issue is that some query returns duplicate rows after FOR UPDATE was blocked, in other words, after getting HeapTupleUpdated in ExecLockRows. Good catch! In the EPQ block in ExecScanFetch, it seems should return NULL if the

Re: [HACKERS] [Bug] Duplicate results for inheritance and FOR UPDATE.

2014-12-11 Thread Kyotaro HORIGUCHI
Hello, This issue is that some query returns duplicate rows after FOR UPDATE was blocked, in other words, after getting HeapTupleUpdated in ExecLockRows. Good catch! Thank you. In the EPQ block in ExecScanFetch, it seems should return NULL if the relation does not has test tuple.