Re: pageinspect: Hash index support

From: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pageinspect: Hash index support
Date: 2017-01-11 20:26:03
Message-ID: CAE9k0P=TdfY7gO4wF3KgfniYNxbHqexsnh1brQbar69Mki2d3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

>
>> + /*
>> + * We copy the page into local storage to avoid holding pin on the
>> + * buffer longer than we must, and possibly failing to release it at
>> + * all if the calling query doesn't fetch all rows.
>> + */
>> + mctx = MemoryContextSwitchTo(fctx->multi_call_memory_ctx);
>> +
>> + uargs = palloc(sizeof(struct user_args));
>> +
>> + uargs->page = palloc(BLCKSZ);
>
> Is this necessary? I think this was copied from btreefuncs, but there
> is no buffer release in this code.

Yes, it was copied from btreefuncs and is not required in this case as
we are already passing raw_page as an input to hash_page_items. I have
taken care of it in the updated patch shared up thread.

With Regards,
Ashutosh Sharma
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2017-01-11 20:35:00 Re: Logical Replication WIP
Previous Message Pavel Stehule 2017-01-11 20:23:39 Re: Packages: Again