Re: Write Ahead Logging for Hash Indexes
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2016-08-24T06:29:46Z
Lists: pgsql-hackers
Attachments
- test_hash.sql (application/octet-stream)
On Wed, Aug 24, 2016 at 11:44 AM, Mark Kirkwood <mark.kirkwood@catalyst.net.nz> wrote: > On 24/08/16 17:01, Mark Kirkwood wrote: >> >> >> ...actually I was wrong there, only 2 of them were the same. So I've >> attached a new log of bt's of them all. >> >> >> > > And I can reproduce with only 1 session, figured that might be a helpful > piece of the puzzle (trace attached). > Thanks. I think I know the problem here. Basically _hash_freeovflpage() is trying to take a lock on a buffer previous to overflow page to update the links and it is quite possible that the same buffer is already locked for moving the tuples while squeezing the bucket. I am working on a fix for the same. Coincidently, Ashutosh Sharma a colleague of mine who was also testing this patch found the same issue by an attached sql script. So we might be able to inculcate a test case in the regression suite as well after fix. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
Commits
-
Add a regression test for snapshot too old with hash indexes.
- 42bdaebf1618 10.0 landed
-
hash: Add write-ahead logging support.
- c11453ce0aea 10.0 landed
-
Improve coding in _hash_addovflpage.
- e898437460f5 10.0 cited
-
Remove _hash_wrtbuf() in favor of calling MarkBufferDirty().
- 25216c989384 10.0 cited
-
Improve hash index bucket split behavior.
- 6d46f4783efe 10.0 cited