Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRJmc-0005jX-2m for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2017 14:21:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cRJmb-0004Oh-Fr for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2017 14:21:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cRJmZ-0004NM-RA for pgsql-hackers@postgresql.org; Wed, 11 Jan 2017 14:21:43 +0000 Received: from mail-qt0-x22d.google.com ([2607:f8b0:400d:c0d::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cRJmW-0007ks-Bg for pgsql-hackers@postgresql.org; Wed, 11 Jan 2017 14:21:43 +0000 Received: by mail-qt0-x22d.google.com with SMTP id v23so196293606qtb.0 for ; Wed, 11 Jan 2017 06:21:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=v4S4YvWbis6VrfbMMkXFNKtU4TZ3NgIahMdwcT3BO+c=; b=DjDLYFpE2PvgS1WjLl/TtJHNXfVAq5DvP2SB5x+4tzK2GYVAbkquLnI+iqoqX5gGX2 2es9S213BCU8qDy/9urRX/Az/75gTwPNEGxPj/+Xync74ET69j6hSDAfKpuIwm1oc7vg Mzr0WLbVjJu++8f66xKYbZY/QU1Sj/WmGxOjntm+esjD3cB25Ev6hYROGi7/aFGgl7Ix MEV5si97yCfltbjpX6wPbp7FF76qGAzLZJFuWdT8kDnzlkivOBSoyNY9jFtOHGu/5Z9s 90Qq9+I6DPtFCCZV3qvYNpC6sxu4F9InvR1Afe5vL9dgjQJY/T2Fv+13zn2ux6VgUjgR qt9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=v4S4YvWbis6VrfbMMkXFNKtU4TZ3NgIahMdwcT3BO+c=; b=JriwHv+9JChWTBLbj57ytTlyxX7BSiKzR1sGu6Ey9gNSRvZtbB9YnQfkBV4D/To6ki JOLOAXf0YihUpDHwfo+7FFaAOPQ8PDPYBKrDchRVlIP1h1rtUk/jot7FeV8XLng6ZtCF m9xcJobTROWK+aZqGBdxnOTed1NEAjrdU9VQiA9DJQ6PJ/LxdhuBPgQZjxiTh8TTuxra oYhFp5+hwOqt+GWOwK1ZLdbn2q0ADPlCfTYyWhpXXQ7ZwxTenHcLN/byxjgeejjSb2HP fF8/kzlvMyXvQz9cSlOPrJkAoAUXyE+3Rrp099OzrrQHMRxk5SwXHSMc4ow4ZHOllfMP wF4w== X-Gm-Message-State: AIkVDXIZbpMx339D9se+5IwdoDJvjHNb3o5hjSnVuqJJz0K7/wg93vRvIA8Z8kZqpWYOCxL+ X-Received: by 10.237.36.12 with SMTP id r12mr7450283qtc.32.1484144498660; Wed, 11 Jan 2017 06:21:38 -0800 (PST) Received: from alvin.alvh.no-ip.org ([181.42.254.77]) by smtp.gmail.com with ESMTPSA id q88sm4177064qkq.21.2017.01.11.06.21.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 06:21:38 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 967BBD65; Wed, 11 Jan 2017 11:21:35 -0300 (CLST) Date: Wed, 11 Jan 2017 11:21:35 -0300 From: Alvaro Herrera To: Jesper Pedersen Cc: Tom Lane , Ashutosh Sharma , Robert Haas , Peter Eisentraut , Michael Paquier , Jeff Janes , PostgreSQL Hackers Subject: Re: pageinspect: Hash index support Message-ID: <20170111142135.7zgo3vxaml5k4uwt@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <59ce3337-075d-d8ee-fe33-280a4cc0700a@redhat.com> User-Agent: NeoMutt/20161104 (1.7.1) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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