On Wed, Dec 14, 2016 at 10:47 PM, Robert Haas <robertmh...@gmail.com> wrote: > On Wed, Dec 14, 2016 at 4:27 AM, Amit Kapila <amit.kapil...@gmail.com> wrote: >> >> Yeah, it will fix the problem in hashbucketcleanup, but there are two >> other problems that need to be fixed for which I can send a separate >> patch. By the way, as mentioned to you earlier that WAL patch already >> takes care of removing _hash_wrtbuf and simplified the logic wherever >> possible without introducing the logic of MarkBufferDirty multiple >> times under one lock. However, if you want to proceed with the >> current patch, then I can send you separate patches for the remaining >> problems as addressed in bug fix patch. > > That sounds good. >
Attached are the two patches on top of remove-hash-wrtbuf. Patch fix_dirty_marking_v1.patch allows to mark the buffer dirty in one of the corner cases in _hash_freeovflpage() and avoids to mark dirty without need in _hash_squeezebucket(). I think this can be combined with remove-hash-wrtbuf patch. fix_lock_chaining_v1.patch fixes the chaining behavior (lock next overflow bucket page before releasing the previous bucket page) was broken in _hash_freeovflpage(). These patches can be applied in series, first remove-hash-wrtbuf, then fix_dirst_marking_v1.patch and then fix_lock_chaining_v1.patch. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
fix_dirty_marking_v1.patch
Description: Binary data
fix_lock_chaining_v1.patch
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers