pgsql: Remove redundant memset(0) calls for page init of some index AMs - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Remove redundant memset(0) calls for page init of some index AMs
Date
Msg-id E1lU0ra-0004Sq-He@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Remove redundant memset(0) calls for page init of some index AMs

Bloom, GIN, GiST and SP-GiST rely on PageInit() to initialize the
contents of a page, and this routine fills entirely a page with zeros
for a size of BLCKSZ, including the special space.  Those index AMs have
been using an extra memset() call to fill with zeros the special page
space, or even the whole page, which is not necessary as PageInit()
already does this work, so let's remove them.  GiST was not doing this
extra call, but has commented out a system call that did so since
6236991.

While on it, remove one MAXALIGN() for SP-GiST as PageInit() takes care
of that.  This makes the whole page initialization logic more consistent
across all index AMs.

Author: Bharath Rupireddy
Reviewed-by: Vignesh C, Mahendra Singh Thalor
Discussion: https://postgr.es/m/CALj2ACViOo2qyaPT7krWm4LRyRTw9kOXt+g6PfNmYuGA=YHj9A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4c0239cb7a7775e3183cb575e62703d71bf3302d

Modified Files
--------------
contrib/bloom/blinsert.c             | 1 -
contrib/bloom/blutils.c              | 1 -
src/backend/access/gin/ginutil.c     | 1 -
src/backend/access/gist/gistutil.c   | 2 --
src/backend/access/spgist/spgutils.c | 3 +--
5 files changed, 1 insertion(+), 7 deletions(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgsql: Add some information about authenticated identity via log_connec
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Message improvement