Re: [HACKERS] _hash_alloc_buckets() safety

2016-09-13 Thread Amit Kapila
On Tue, Sep 13, 2016 at 6:58 PM, Tom Lane wrote: > Amit Kapila writes: >> While working on write-ahead-logging of hash indexes, I noticed that >> this function allocates buckets in batches and the mechanism it uses >> is that it initialize the last

Re: [HACKERS] _hash_alloc_buckets() safety

2016-09-13 Thread Tom Lane
Amit Kapila writes: > While working on write-ahead-logging of hash indexes, I noticed that > this function allocates buckets in batches and the mechanism it uses > is that it initialize the last page of batch with zeros and expect > that the filesystem will ensure the

[HACKERS] _hash_alloc_buckets() safety

2016-09-13 Thread Amit Kapila
While working on write-ahead-logging of hash indexes, I noticed that this function allocates buckets in batches and the mechanism it uses is that it initialize the last page of batch with zeros and expect that the filesystem will ensure the intervening pages read as zeroes too. I think to make it