Re: Write Ahead Logging for Hash Indexes

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Jesper Pedersen <jesper.pedersen@redhat.com>, Jeff Janes <jeff.janes@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-02-13T15:22:09Z
Lists: pgsql-hackers

Attachments

On Fri, Feb 10, 2017 at 12:15 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> On Thu, Feb 9, 2017 at 10:28 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>
>> The things that look like preliminary refactoring to
>> me are:
>>
>> - Adding _hash_pgaddmultitup and using it in various places.
>> - Adding and freeing overflow pages has been extensively reworked.
>>
>
> Freeing the overflow page is too tightly coupled with changes related
> to _hash_pgaddmultitup, so it might be better to keep it along with
> it.  However, I think we can prepare a separate patch for changes
> related to adding the overflow page.
>
>> - Similarly, there is some refactoring of how bitmap pages get initialized.
>> - Index initialization has been rejiggered significantly.
>> - Bucket splits have been rejiggered.
>>
>

As discussed, attached are refactoring patches and a patch to enable
WAL for the hash index on top of them.



-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Commits

  1. Add a regression test for snapshot too old with hash indexes.

  2. hash: Add write-ahead logging support.

  3. Improve coding in _hash_addovflpage.

  4. Remove _hash_wrtbuf() in favor of calling MarkBufferDirty().

  5. Improve hash index bucket split behavior.