Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kzcdw-0001RU-1m for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Jan 2021 09:40:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kzcdP-0005XI-H7 for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Jan 2021 09:40:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kzcdP-0005XB-6Z for pgsql-hackers@lists.postgresql.org; Wed, 13 Jan 2021 09:40:11 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kzcdM-0000sE-Bc for pgsql-hackers@postgresql.org; Wed, 13 Jan 2021 09:40:10 +0000 Received: from Sergeys-MacBook-Pro.local (unknown [62.217.185.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 96FCF21C234A; Wed, 13 Jan 2021 12:40:06 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1610530806; bh=REcbU1jjw8EtUDS5KUmW27wlRInUwx3D3KEuil5/YTk=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=GAPprOXkk/P3tgtPmhfdXDnlVgrJoUjw5h/8ch8yZ8ygjj8Rx48ssJac1YdTIZDwf Wy17l38I9TisOG39MmU3Sl942UtwV4j8PUvkE0o6ZkZGMcA1zLA1/bUVhYCh9tCIj/ Rr/3HVQR3THJkWdl+VHvn6InYrjpGJZoHGOoQP68= Subject: Re: pg_preadv() and pg_pwritev() To: Thomas Munro Cc: pgsql-hackers References: <341497.1608420857@sss.pgh.pa.us> <20201220224040.evr5pduibvm6dze5@alap3.anarazel.de> From: Sergey Shinderuk Message-ID: Date: Wed, 13 Jan 2021 12:40:06 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11.01.2021 05:59, Thomas Munro wrote: > Since only sifaka has managed to return a result so far (nice CPU), I > had plenty of time to notice that macOS Big Sur has introduced > preadv/pwritev. They were missing on Catalina[1]. > > [1] https://cirrus-ci.com/task/6002157537198080 Hi, Thomas! Indeed, pwritev is not available on macOS Catalina. So I get compiler warnings about that: /Users/shinderuk/src/pgwork/devel/build/../src/port/pwrite.c:117:10: warning: 'pwritev' is only available on macOS 11.0 or newer [-Wunguarded-availability-new] part = pg_pwritev(fd, iov, iovcnt, offset); ^~~~~~~~~~ /Users/shinderuk/src/pgwork/devel/build/../src/include/port/pg_iovec.h:49:20: note: expanded from macro 'pg_pwritev' #define pg_pwritev pwritev ^~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/sys/uio.h:104:9: note: 'pwritev' has been marked as being introduced in macOS 11.0 here, but the deployment target is macOS 10.15.0 ssize_t pwritev(int, const struct iovec *, int, off_t) __DARWIN_NOCANCEL(pwritev) __API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)); ^ /Users/shinderuk/src/pgwork/devel/build/../src/port/pwrite.c:117:10: note: enclose 'pwritev' in a __builtin_available check to silence this warning part = pg_pwritev(fd, iov, iovcnt, offset); ^~~~~~~~~~ /Users/shinderuk/src/pgwork/devel/build/../src/include/port/pg_iovec.h:49:20: note: expanded from macro 'pg_pwritev' #define pg_pwritev pwritev ^~~~~~~ 1 warning generated. (... several more warnings ...) And initdb fails: running bootstrap script ... dyld: lazy symbol binding failed: Symbol not found: _pwritev Referenced from: /Users/shinderuk/src/pgwork/devel/install/bin/postgres Expected in: /usr/lib/libSystem.B.dylib dyld: Symbol not found: _pwritev Referenced from: /Users/shinderuk/src/pgwork/devel/install/bin/postgres Expected in: /usr/lib/libSystem.B.dylib Regards. -- Sergey Shinderuk Postgres Professional: http://www.postgrespro.com The Russian Postgres Company