Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rCca6-00GfE9-KD for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Dec 2023 09:28:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rCca4-00CfN0-PV for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Dec 2023 09:28:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rCca4-00CfMq-CV for pgsql-hackers@lists.postgresql.org; Mon, 11 Dec 2023 09:28:04 +0000 Received: from meesny.iki.fi ([195.140.195.201]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rCca1-00BMCq-P3 for pgsql-hackers@postgresql.org; Mon, 11 Dec 2023 09:28:03 +0000 Received: from [192.168.1.115] (dsl-hkibng22-54f8db-125.dhcp.inet.fi [84.248.219.125]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by meesny.iki.fi (Postfix) with ESMTPSA id 4Spby721NHzyNL; Mon, 11 Dec 2023 11:27:58 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1702286879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MfH4FRKW3mTd5BhRfBB9BMkYFjEhrR4Jm8yORxUOAgI=; b=A/oepo8lHRDmebAbs2KWE0oQVga8upCdDj1pycO/Lcm6It8p4/9GALzhkIGmroESRBA/QK OeEupKAFmQKyOL51yBb+o9Ono2jDxkLYA0YeJrlCFtg7tFdfp6SYHx9mBCh/1A1GhYbMtx Xh/JovQY5KG7pyvuDcOMWOTqO3ITOlA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1702286879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MfH4FRKW3mTd5BhRfBB9BMkYFjEhrR4Jm8yORxUOAgI=; b=clMQz3fFpYEQBgIMa5gHi/2bkk7UFtw8D+wYMrnSOZeMyYg1XSI/rsLY2bhrmXyocVjMZG CXXHnUGuwF88Vhh4+ZMU9rH4dzYftaYaxoV4mRrSB1uyS+Sq08Qasn89C44UbHYaLTPkXm 9FFJhb0bxQgx1Azy6twxNR8EMBcsT9E= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1702286879; a=rsa-sha256; cv=none; b=wWCL/lE+rChy29HCp8CGdxXU63c1iqEEOFOpxSHC10W9ZVNgHOCeCwbZQ/Iv/LElrVx/4d aHVDC+u61tZhhQsZRaXx/IMvNPx0osnNE0ISdutBttJXxgsnTI2423w345cJ2916smr076 XS2wZgqyIYnbhLQ6Xq7A0nB5GukxIp0= Message-ID: <8f5aca0a-4d12-46e8-8ce4-d196acfa8baf@iki.fi> Date: Mon, 11 Dec 2023 11:27:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Streaming I/O, vectored I/O (WIP) Content-Language: en-US To: Thomas Munro Cc: Andres Freund , pgsql-hackers , Melanie Plageman References: <1c6f0c38-9181-4869-983f-3d6ef17dea3c@iki.fi> <20231208182554.swereaxcgvq72ts6@awork3.anarazel.de> <4533e76e-9519-4715-acd0-d4fa552619b0@iki.fi> From: Heikki Linnakangas In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/12/2023 11:12, Thomas Munro wrote: > 1. I eventually figured out how to generalise > compute_remaining_iovec() (as I now call it) so that the existing > pg_pwritev_with_retry() in file_utils.c could also use it, so that's > now done in a patch of its own. In compute_remaining_iovec(): > 'source' and 'destination' may point to the same array, in which > case it is adjusted in-place; otherwise 'destination' must have enough > space for 'iovcnt' elements. Is there any use case for not adjusting it in place? pg_pwritev_with_retry() takes a const iovec array, but maybe just remove the 'const' and document that it scribbles on it? > I'm planning to commit these fairly soon. +1 -- Heikki Linnakangas Neon (https://neon.tech)