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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Remove redundant memset(0) calls for page init of some index AMs
Дата
Msg-id E1lU0ra-0004Sq-He@gemulon.postgresql.org
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pgsql: Add some information about authenticated identity via log_connec
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Message improvement