From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, 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 14:21:35 |
Message-ID: | 20170111142135.7zgo3vxaml5k4uwt@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2017-01-11 14:27:48 | Re: plpgsql - additional extra checks |
Previous Message | Dilip Kumar | 2017-01-11 14:17:35 | Re: New SQL counter statistics view (pg_stat_sql) |