Re: define pg_structiszero(addr, s, r)

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Ranier Vilela <ranier.vf@gmail.com>, David Rowley <dgrowleyml@gmail.com>, Peter Smith <smithpb2250@gmail.com>, Peter Eisentraut <peter@eisentraut.org>, Heikki Linnakangas <hlinnaka@iki.fi>, pgsql-hackers@lists.postgresql.org
Date: 2024-11-18T03:04:57Z
Lists: pgsql-hackers
On Fri, Nov 15, 2024 at 02:43:32PM +0000, Bertrand Drouvot wrote:
> Thinking about it, actually, "[sizeof(size_t) * 8, inf)" (note the ')' at the end)
> might be the proper notation from a mathematical point of view.

v13 relied on a notation I've always used in maths, as infinity cannot
be included.  Anyway, yes, using a parenthesis seems to me more
consistent after looking around with what we have in the tree, so I've
tweaked that and applied the two patches after an extra round of
checks. 
--
Michael

Commits

  1. Use pg_memory_is_all_zeros() in PageIsVerifiedExtended()

  2. Optimize pg_memory_is_all_zeros() in memutils.h

  3. Remove use of pg_memory_is_all_zeros() in bufpage.c

  4. Add pg_memory_is_all_zeros() in memutils.h