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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to