pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Jesper Pedersen <jesper.pedersen@redhat.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ashutosh Sharma <ashu.coek88@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: pageinspect: Hash index support
Date: Wed, 11 Jan 2017 11:21:35 -0300
Message-ID: <20170111142135.7zgo3vxaml5k4uwt@alvherre.pgsql> (raw)
In-Reply-To: <59ce3337-075d-d8ee-fe33-280a4cc0700a@redhat.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


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



view thread (110+ messages)  latest in thread

Message-ID: <20170111142135.7zgo3vxaml5k4uwt@alvherre.pgsql>
Permalink:  ../20170111142135.7zgo3vxaml5k4uwt@alvherre.pgsql/
Also on:    postgresql.org/message-id/20170111142135.7zgo3vxaml5k4uwt@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@2ndquadrant.com, jesper.pedersen@redhat.com, tgl@sss.pgh.pa.us, ashu.coek88@gmail.com, robertmhaas@gmail.com, peter.eisentraut@2ndquadrant.com, michael.paquier@gmail.com, jeff.janes@gmail.com
  Subject: Re: pageinspect: Hash index support
  In-Reply-To: <20170111142135.7zgo3vxaml5k4uwt@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox