macOS prefetching support

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: macOS prefetching support
Date: 2024-08-14 07:03:55
Message-ID: 0827edec-1317-4917-a186-035eb1e3241d@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

It seems to me that we could implement prefetching support
(USE_PREFETCH) on macOS using the fcntl() command F_RDADVISE. The man
page description is a bit terse:

F_RDADVISE Issue an advisory read async with no copy to user.

But it seems to be the right idea. Was this looked into before? I
couldn't find anything in the archives.

Attached is a patch to implement this. It seems to work, but of course
it's kind of hard to tell whether it actually does anything useful.

(Even if the performance effects were negligible, this would be useful
to get the prefetch code some exercise on this platform.)

Thoughts?

Attachment Content-Type Size
0001-Add-prefetching-support-on-macOS.patch text/plain 4.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2024-08-14 07:20:52 Re: collect_corrupt_items_vacuum.patch
Previous Message Heikki Linnakangas 2024-08-14 07:02:28 Re: Remove dependence on integer wrapping