Re: pageinspect: Hash index support

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Jesper Pedersen <jesper.pedersen@redhat.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Ashutosh Sharma <ashu.coek88@gmail.com>, 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-11T14:21:35Z
Lists: pgsql-hackers
Jesper Pedersen wrote:

> +		/*
> +		 * 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.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Commits

  1. Fix incorrect typecast.

  2. In pageinspect/hashfuncs.c, avoid crashes on alignment-picky machines.

  3. pageinspect: Support hash indexes.

  4. Add uuid to the set of types supported by contrib/btree_gist.

  5. Allow CREATE EXTENSION to follow extension update paths.