On Wed, Feb 26, 2025 at 4:44 PM Kashaela Ransaw
<kashaela.ransaw@csuglobal.edu> wrote:
>>> Dyld Error Message:
>>> Symbol not found: _pwritev
As an intellectual curiosity only, if you really wanted to try to make
it work (for non-production use only! not sure what else would break
next...) then I suspect you could compile this into pwritev.dylib and
point to it with DYLD_INSERT_LIBRARIES to satisfy that symbol with a
good-enough-for-now emulation, assuming that loader mechanism isn't
disabled by the code-signing feature of macOS (I don't recall the
detail of that):
#include <sys/uio.h>
#include <unistd.h>
size_t
pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset)
{
if (lseek(fd, offset, SEEK_SET) < 0)
return -1;
return writev(fd, iov, iovcnt, offset);
}
And for PostgreSQL 17 you'd need preadv() too.
PostgreSQL itself knows how to supply an emulation function if the
selected target OS version doesn't have pwritev(). The last known
Unixen that needed it were macOS < 11.0 (Kritika mentioned those
builds target 12.0) and Solaris < 11.4 SRU69. PostgreSQL also
currently tolerates emulations that change the current file position
like that, because the fallback we still use for Windows also has
that property (something to be addressed eventually).
But the real question is: why don't you just upgrade the OS to a
supported version? 10.anything must be way out of Apple support and
missing a lot of security fixes.