On Apr 1, 2017 18:11, "Amit Kapila" <amit.kapil...@gmail.com> wrote:
On Sat, Apr 1, 2017 at 6:00 AM, Robert Haas <robertmh...@gmail.com> wrote: > On Fri, Mar 31, 2017 at 6:09 PM, Ashutosh Sharma <ashu.coe...@gmail.com> wrote: >> Well, That is another option but the main idea was to be inline with >> the btree code. > > That's not a bad goal in principal, but _bt_killitems() doesn't have > any similar argument. > > (Also, speaking of consistency, why did we end up with > _hash_kill_items, with an underscore between kill and items, and > _bt_killitems, without one?) > >> Moreover, I am not sure if acquiring lwlock inside >> hashendscan (basically the place where we are trying to close down the >> things) would look good. > > Well, if that's not a good thing to do, hiding it inside some other > function doesn't make it better. I think it's fine, though. > One thing to note here is that this fix won't be required if we get the page-scan-mode patch [1] in this CF. I think if we fix this with the patch proposed by Ashutosh, then we anyway needs to again change the related code (kind of revert the fix) after page-scan-mode patch. Now, if you think we have negligible chance of getting that patch, then it is good to proceed with this fix. Yes, I had already mentioned this point in my very first mail. Thanks for highlighting this once again. [1] - https://commitfest.postgresql.org/13/999/