Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZJkkq-0002jS-Oc for pgsql-committers@arkaria.postgresql.org; Mon, 27 Jul 2015 15:55:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZJkkq-0000KZ-9k for pgsql-committers@arkaria.postgresql.org; Mon, 27 Jul 2015 15:55:52 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZJkkp-0000Cr-CZ for pgsql-committers@postgresql.org; Mon, 27 Jul 2015 15:55:51 +0000 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZJkkn-0000qP-1f for pgsql-committers@postgresql.org; Mon, 27 Jul 2015 15:55:50 +0000 Received: by wibud3 with SMTP id ud3so122331804wib.0 for ; Mon, 27 Jul 2015 08:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=HprvZm+OVZo28vZYjRz8v061LyG3zQAfGJtpv/BE/G8=; b=vCSrxNc88kpc+UamGntzHUuQhjmOg6Sl98+J8X7AQ4GJ++VqzJuNb4iJXH8VHJzE8U J0r1oaFqOyqp+qfeUN+vIh0Qxk3bjf+Pewu926c/exPc6QdvS7F1yhbk3ubhng+yfx2l JCrxmh8N0i+m+wcfRew9HlAEntDAb9d/zXc33mi8JlUgYLOyyjjUZK4CrY3h3Xso06n2 ICrJ+Aj/5I8giw2Bzo99H4sxiFHXQeHPj/d3vYbKvkfCC3rCRyJD05sW2o79CetsdNVE pw9qeMhZ78LLqYuKSN3nYS2h2StHFmDpc4Jv38aKatSE7c3HJ9h+i8lA7xpeHA+hWzkv +6bw== X-Received: by 10.194.84.179 with SMTP id a19mr54270715wjz.29.1438012547710; Mon, 27 Jul 2015 08:55:47 -0700 (PDT) Received: from [192.168.1.105] (dsl-hkibrasgw1-58c38f-82.dhcp.inet.fi. [88.195.143.82]) by smtp.gmail.com with ESMTPSA id ez4sm14300631wid.14.2015.07.27.08.55.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jul 2015 08:55:46 -0700 (PDT) Message-ID: <55B65481.1040100@iki.fi> Date: Mon, 27 Jul 2015 18:55:45 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Tom Lane CC: pgsql-committers@postgresql.org Subject: Re: pgsql: Fix handling of all-zero pages in SP-GiST vacuum. References: <27183.1438011411@sss.pgh.pa.us> In-Reply-To: <27183.1438011411@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On 07/27/2015 06:36 PM, Tom Lane wrote: > Heikki Linnakangas writes: >> Fix handling of all-zero pages in SP-GiST vacuum. > > I'm a little bit uncomfortable with the way that this patch presumes that > PageIsEmpty (a) is safe on an all-zeroes page and (b) will return true for > such a page. Yes, it does work at the moment; but I don't think we are > making such an assumption anyplace else, and in view of your other two > concurrent patches, it doesn't seem very future-proof here either. > I recommend that the code look more like > > if (!SpGistBlockIsRoot(blkno)) > { > if (PageIsNew(page) || PageIsEmpty(page)) > I thought I saw other places that assumed that, and I even thought I saw a comment somewhere documenting that usage. But now that I grep around, I see no such thing. I'll go change that... - Heikki -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers