Make use of pg_memory_is_all_zeros() in more places

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Make use of pg_memory_is_all_zeros() in more places
Date: 2024-12-10 14:18:33
Message-ID: Z1hNubHfvMxlW6eu@ip-10-97-1-34.eu-west-3.compute.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

While searching for memcmp() calls in "*stat*.c" files (due to [1]), it appeared
that we could $SUBJECT. Please find attached a patch doing so.

While at it, I did a quick check on all the memcmp() calls (even those not in
"*stat*.c" files) and it looks to me that there is no others that could be replaced
with pg_memory_is_all_zeros().

[1]: https://www.postgresql.org/message-id/flat/Z1hNLvcPgVLPxCoc%40ip-10-97-1-34.eu-west-3.compute.internal

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v1-0001-Make-use-of-pg_memory_is_all_zeros-in-more-places.patch text/x-diff 2.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ilia Evdokimov 2024-12-10 14:35:18 Re: Sample rate added to pg_stat_statements
Previous Message Andrey M. Borodin 2024-12-10 14:17:55 Re: Fix bank selection logic in SLRU