pgsql: Remove use of pg_memory_is_all_zeros() in bufpage.c

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove use of pg_memory_is_all_zeros() in bufpage.c
Date: 2024-11-01 08:07:33
Message-ID: E1t6mgv-003PZO-Vv@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Remove use of pg_memory_is_all_zeros() in bufpage.c

After a closer lookup, this makes the all-zero check of the page more
expensive, so let's remove the new function call in bufpage.c. The
maths of the check were also incorrect, checking that the page was full
of zeros only for the first 1kB.

This brings back the code to the state it was at 49d6c7d8daba.

Per discussion with David Rowley and Bertrand Drouvot.

Discussion: https://postgr.es/m/CAApHDvrXzPAr3FxoBuB7b3D-okNoNA2jxLun1rW8Yw5wkbqusw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e819bbb7c82ac048ffd865ba3f2d2c4933923c77

Modified Files
--------------
src/backend/storage/page/bufpage.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2024-11-01 12:07:59 pgsql: Rename two functions that wake up other processes
Previous Message Michael Paquier 2024-11-01 02:36:20 pgsql: Add pg_memory_is_all_zeros() in memutils.h