Re: [HACKERS] _hash_addovflpage has a bug

2017-01-10 Thread Robert Haas
On Mon, Jan 9, 2017 at 10:46 PM, Amit Kapila wrote: > Yeah, we can write code that way, but then it is better to rely just > on retain_pin variable in the function and add an Assert for bucket > page whenever we are retaining pin. How about doing something like >

Re: [HACKERS] _hash_addovflpage has a bug

2017-01-09 Thread Amit Kapila
On Mon, Jan 9, 2017 at 11:59 PM, Robert Haas wrote: > On Fri, Jan 6, 2017 at 11:32 PM, Amit Kapila wrote: >> On Sat, Jan 7, 2017 at 2:33 AM, Robert Haas wrote: >>> It looks to to me like the recent hash index changes have

Re: [HACKERS] _hash_addovflpage has a bug

2017-01-09 Thread Robert Haas
On Fri, Jan 6, 2017 at 11:32 PM, Amit Kapila wrote: > On Sat, Jan 7, 2017 at 2:33 AM, Robert Haas wrote: >> It looks to to me like the recent hash index changes have left >> _hash_addovflpage slightly broken. I think that if that function >>

Re: [HACKERS] _hash_addovflpage has a bug

2017-01-06 Thread Amit Kapila
On Sat, Jan 7, 2017 at 2:33 AM, Robert Haas wrote: > It looks to to me like the recent hash index changes have left > _hash_addovflpage slightly broken. I think that if that function > reaches the point where it calls _hash_getbuf() to fetch the next page > in the bucket

[HACKERS] _hash_addovflpage has a bug

2017-01-06 Thread Robert Haas
It looks to to me like the recent hash index changes have left _hash_addovflpage slightly broken. I think that if that function reaches the point where it calls _hash_getbuf() to fetch the next page in the bucket chain, we also need to clear retain_pin. Otherwise, we'll erroneously think that