From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Fix handling of all-zero pages in SP-GiST vacuum.
Date: Mon, 27 Jul 2015 11:36:51 -0400
Message-ID: <27183.1438011411@sss.pgh.pa.us> (raw)
In-Reply-To: <E1ZJk7X-0001dF-Bq@gemulon.postgresql.org>
References: <E1ZJk7X-0001dF-Bq@gemulon.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Heikki Linnakangas <heikki.linnakangas@iki.fi> 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))
regards, tom lane
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, heikki.linnakangas@iki.fi
Subject: Re: pgsql: Fix handling of all-zero pages in SP-GiST vacuum.
In-Reply-To: <27183.1438011411@sss.pgh.pa.us>
References: <E1ZJk7X-0001dF-Bq@gemulon.postgresql.org> <27183.1438011411@sss.pgh.pa.us>
* 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