Re: pageinspect: Hash index support
Ashutosh Sharma <ashu.coek88@gmail.com>
From: Ashutosh Sharma <ashu.coek88@gmail.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Jesper Pedersen <jesper.pedersen@redhat.com>,
Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Michael Paquier <michael.paquier@gmail.com>,
Jeff Janes <jeff.janes@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2017-01-11T20:26:03Z
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
Commits
-
Fix incorrect typecast.
- b4316928d57b 10.0 landed
-
In pageinspect/hashfuncs.c, avoid crashes on alignment-picky machines.
- 14e9b18fed28 10.0 landed
-
pageinspect: Support hash indexes.
- 08bf6e529587 10.0 landed
-
Add uuid to the set of types supported by contrib/btree_gist.
- 11da83a0e70d 10.0 cited
-
Allow CREATE EXTENSION to follow extension update paths.
- 40b449ae84dc 10.0 cited