On Sat, Jan 23, 2016 at 12:19 PM, Amit Kapila <amit.kapil...@gmail.com> wrote:
> On Tue, Jan 12, 2016 at 2:41 PM, Dilip Kumar <dilipbal...@gmail.com> > wrote: > >> On Thu, Jan 7, 2016 at 4:53 PM, Andres Freund <and...@anarazel.de> wrote: >> >>> On 2016-01-07 16:48:53 +0530, Amit Kapila wrote: >>> >>> I think it's a worthwhile approach to pursue. But until it actually >>> fixes the problem of leaving around uninitialized pages I don't think >>> it's very meaningful to do performance comparisons. >>> >> >> Attached patch solves this issue, I am allocating the buffer for each >> page and initializing the page, only after that adding to FSM. >> > > Few comments about patch: > > I found one more problem with patch. ! UnlockReleaseBuffer(buffer); ! RecordPageWithFreeSpace(relation, BufferGetBlockNumber(buffer), freespace); You can't call BufferGetBlockNumber(buffer) after releasing the pin on buffer which will be released by UnlockReleaseBuffer(). Get the block number before unlocking the buffer. With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com