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 1pZ2UH-0001ES-9t for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Mar 2023 04:30:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pZ2UG-0001KZ-6o for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Mar 2023 04:30:12 +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 1pZ2UE-0001Hw-J2 for pgsql-hackers@lists.postgresql.org; Mon, 06 Mar 2023 04:30:11 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZ2U7-0003mD-HX for pgsql-hackers@lists.postgresql.org; Mon, 06 Mar 2023 04:30:09 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 17C513200034; Sun, 5 Mar 2023 23:29:59 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 05 Mar 2023 23:29:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1678076998; x=1678163398; bh=/m yzBpgz9StTgHGulEzicvFv5oHCDgGZVT4pb822mlQ=; b=g9Y0ACBMX8BBu3MVfD ggxd38KS6iSsmy2RjVhqm4PBXbFQHGOj3Wgay9EdSrngddHzeCnH5dyiuYYllPdW Ufaf+0dVch/EgnslSw1cwS3T7XPRNJOxYndFVwWEIzvYhhHAUssK/Gn4a7/5OOTj jBK2/OWPkzxdGDoLSWjg4PfiUNWHWG+9H5+lAJ1FAnLRMlPFBuoda38mFx6tiVbH OT5xQvhDkfSsj19ozSYmRvN2bFTCuGK0n5TNXPkFwT01fYhMT7DtnKc5EgTxkFpN R0CNmM1r751rfFR/BxXEJYSNxJXDPUYugEn/G7vwBSw2eqYi4J/f/+fpN02vF5S5 Bn6A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1678076998; x=1678163398; bh=/myzBpgz9StTg HGulEzicvFv5oHCDgGZVT4pb822mlQ=; b=W9ZxvBLvyglSWTwPfEkU+kAf6Dz3K /OqPgEnIy5ESsmT6zP3Bh/0CFkbr/YE6C8Xg9JSFpXZ4+kABL5SS8rFuySWH//fi PDy3VT+i5aEVqSm8BYiozE2rphi4g7jgPObELvc9ulXF2npRwj8lFNJ3KGpPG/yM Q+GlJg/I7wvEwwPcUXQ1xBwzT8/WYJUW7+4OZ7Dkq2hsaW0DOeSw0UnJiA9qPU5e zLZwtFsA7mDTj0APCoybw3gIp8FgR0knDI8meCOC15+A++SYXunaYRdtJ3xprggK fgyzrej6J+whf2k3pre11GTDmEahDHiznJhjKSzF9YRzAX4IQfKDu+72w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddthedgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 5 Mar 2023 23:29:54 -0500 (EST) Date: Mon, 6 Mar 2023 13:29:50 +0900 From: Michael Paquier To: Bharath Rupireddy Cc: Andres Freund , Alvaro Herrera , Nathan Bossart , Thomas Munro , PostgreSQL Hackers Subject: Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes? Message-ID: References: <20230214011056.3qkp7rg4ioqn356v@awork3.anarazel.de> <20230215005525.mrrlmqrxzjzhaipl@awork3.anarazel.de> <20230216190020.67rslbjq4tmo6cvh@awork3.anarazel.de> <20230217173114.kxnzc7wt7xtusnlv@awork3.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hkAYzGSVhT6ba7NA" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --hkAYzGSVhT6ba7NA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 20, 2023 at 01:54:00PM +0530, Bharath Rupireddy wrote: > I ran some tests on my dev system [1] and I don't see much difference > between v3 and v4. So, +1 for v3 patch (+ argument order swap) from > Andres to keep the code simple and elegant. This thread has stalled for a couple of weeks, so I have gone back to it. Testing on a tmpfs I am not seeing a difference if performance for any of the approaches discussed. At the end, as I am the one behind the introduction of pg_pwrite_zeros(), I have applied v3 after=20 switches the size and offset parameters to be the same way as in v4. -- Michael --hkAYzGSVhT6ba7NA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmQFbD4ACgkQnvQgOdby QH1e3g/9HGsiyYO9k/OBbsLPj2RG0ruxkiuBWeNk2Vra4JvWBE529NnzqSOuwwp6 ucbA45Bp9GoZQBD+waCVrxDsyqpAtI9zjBRl07CdC/MCSRFHDdoh9auy3oMWRqJC qYbx9Wy6c6yy3pvcd6OL25CE/pzMdqhKVqZq+bRGlB7vjPpnL1P3RPhHas3h06EO Tx2YsHewmcZOtBhswkco14F7rM3gXulyuPeB7oXhqGZUlGCDSDXVMH9A0fcTJJa7 HSumrZSHxwiUpdcC0fKUyLXNpwPkyXzpBjOPsMB4u45/M1PtPt3+Z2K4J7SWuJR2 T0oaLiNBy7TRdmOdoPflyLb8gzb6dWT8ZT8LLpGHmx+778098wQiXkrCigVC4XgO GggLNQM+ezNHTIQjniExEJySrcuJcGQ/ox2jXGZ7sbga9y2AIK/BBB8y938bBNjP jEWQHDsedIdtpdUVy4UcS8CF/D4y4GYxRuaCEypABdRMc5T4ajRKBIga5PpMCniA yP1IMJL3xe7+YXjd5p2OKSiecIVfxvIi8PwR/BdWAbTPxb/iL999sUdSnLpUMU7h e3h9oTz5BhyfdAK52ZcKarnHSJMDJ+Juhtu8/UKTZMEp4rpWGl29jJqG1HHGPaM2 w7wenXmHDO+ExnKDjCfNNYZaybTU/TJJ/G5NJN/ZOmko3pDJY7A= =bt48 -----END PGP SIGNATURE----- --hkAYzGSVhT6ba7NA--