Re: macOS prefetching support

2024-09-03 Thread Peter Eisentraut
On 03.09.24 03:47, Thomas Munro wrote: On Mon, Aug 19, 2024 at 1:35 AM Peter Eisentraut wrote: On 17.08.24 00:01, Thomas Munro wrote: I think that's fine. I don't really like the word "prefetch", could mean many different things. What about "requires OS support for issuing read-ahead advice"

Re: macOS prefetching support

2024-09-02 Thread Thomas Munro
On Mon, Aug 19, 2024 at 1:35 AM Peter Eisentraut wrote: > On 17.08.24 00:01, Thomas Munro wrote: > > I think that's fine. I don't really like the word "prefetch", could > > mean many different things. What about "requires OS support for > > issuing read-ahead advice", which uses a word that appe

Re: macOS prefetching support

2024-08-28 Thread Peter Eisentraut
On 29.08.24 03:22, Thomas Munro wrote: Oh, I missed something: I think we're missing FileAcces(), in case the vfd has to be re-opened, no? Fixed, thanks.

Re: macOS prefetching support

2024-08-28 Thread Thomas Munro
Oh, I missed something: I think we're missing FileAcces(), in case the vfd has to be re-opened, no?

Re: macOS prefetching support

2024-08-27 Thread Peter Eisentraut
On 26.08.24 07:54, Thomas Munro wrote: On Sat, Aug 24, 2024 at 12:28 AM Peter Eisentraut wrote: In terms of $subject, this patch seems sufficient for now. WFM. I noticed you don't have an EINTR retry loop, but the man page doesn't say you need one, so overall this patch LGTM. + * posix_fadv

Re: macOS prefetching support

2024-08-25 Thread Thomas Munro
On Sat, Aug 24, 2024 at 12:28 AM Peter Eisentraut wrote: > In terms of $subject, this patch seems sufficient for now. WFM. I noticed you don't have an EINTR retry loop, but the man page doesn't say you need one, so overall this patch LGTM. + * posix_fadvise() is the simplest standardized interf

Re: macOS prefetching support

2024-08-23 Thread Peter Eisentraut
On 18.08.24 15:35, Peter Eisentraut wrote: On 17.08.24 00:01, Thomas Munro wrote: Hmm.  fd.h and fd.c test for F_NOCACHE, which is pretty closely related.  Now I'm wondering why we actually need this in pg_config_manual.h at all.  Who would turn it off at compile time, and why would they not be

Re: macOS prefetching support

2024-08-18 Thread Peter Eisentraut
On 17.08.24 00:01, Thomas Munro wrote: On Sat, Aug 17, 2024 at 6:58 AM Peter Eisentraut wrote: What to do about the order of the symbols and include files. I threw something into src/include/port/darwin.h, but I'm not sure if that's good. Alternatively, we could not use __darwin__ but instead

Re: macOS prefetching support

2024-08-16 Thread Thomas Munro
On Sat, Aug 17, 2024 at 6:58 AM Peter Eisentraut wrote: > solaris fake I'm half tempted to suggest that we take this exception out. If it's there, we call it. It doesn't do anything right now, but it's a cheap empty user space function, and I heard they are thinking about adding a real

Re: macOS prefetching support

2024-08-16 Thread Tom Lane
Thomas Munro writes: > Hmm. fd.h and fd.c test for F_NOCACHE, which is pretty closely > related. Now I'm wondering why we actually need this in > pg_config_manual.h at all. Who would turn it off at compile time, and > why would they not be satisfied with setting relevant GUCs to 0? +1 for not

Re: macOS prefetching support

2024-08-16 Thread Thomas Munro
On Sat, Aug 17, 2024 at 6:58 AM Peter Eisentraut wrote: > What to do about the order of the symbols and include files. I threw > something into src/include/port/darwin.h, but I'm not sure if that's > good. Alternatively, we could not use __darwin__ but instead the more > standard and predefined

Re: macOS prefetching support

2024-08-16 Thread Peter Eisentraut
On 14.08.24 16:39, Peter Eisentraut wrote: On 14.08.24 14:36, Thomas Munro wrote: On Wed, Aug 14, 2024 at 7:04 PM Peter Eisentraut wrote: 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. Header order p

Re: macOS prefetching support

2024-08-14 Thread Peter Eisentraut
On 14.08.24 14:36, Thomas Munro wrote: On Wed, Aug 14, 2024 at 7:04 PM Peter Eisentraut wrote: 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. Header order problem: pg_config_os.h defines __darwin__, b

Re: macOS prefetching support

2024-08-14 Thread Thomas Munro
On Wed, Aug 14, 2024 at 7:04 PM Peter Eisentraut wrote: > 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. Header order problem: pg_config_os.h defines __darwin__, but pg_config_manual.h is included first

macOS prefetching support

2024-08-14 Thread Peter Eisentraut
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 b