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.98.2) (envelope-from ) id 1xU1d4-00000000gee-47kA for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Nov 2026 12:52:44 +0000 Received: from localhost ([127.0.0.1]:45548 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xU1d4-00000001ALs-1XDj for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Nov 2026 12:52:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:54554) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xU1d3-00000001ALk-49x2 for pgsql-hackers@lists.postgresql.org; Thu, 19 Nov 2026 12:52:42 +0000 Received: from lahtoruutu.iki.fi ([185.185.170.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xU1d1-00000000UXW-0fwi for pgsql-hackers@lists.postgresql.org; Thu, 19 Nov 2026 12:52:41 +0000 Received: from [0.0.0.0] (dsl-hkibng12-56720e-230.dhcp.inet.fi [86.114.14.230]) (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 lahtoruutu.iki.fi (Postfix) with ESMTPSA id 4jVdfS5Y6vz49Q3W; Thu, 19 Nov 2026 14:52:32 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1795092753; 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=qSPFqrDKQyonK4JPL7GjSb7lMO/12bbm7c852nGry18=; b=VcK9fhg8Z9K/rzb8O/YSWsKaiFLTiq8JudWNGIGfoM1SoIh4bQXEYdnWN7fHic5s54BSD7 XL1A72rWODIOgus4y3q9nDh0AcXfnQbXrkO3iVBO7ndcGquD/TbMgs8wiATtvcpjsn7LEm FMHzfGgSXAex+FOAfzbi6cVjsi80sqB1rFeu5Q/ruXflmMCXa0IFWAZNydzOIRrI5ZJUtD a/OhwFLgUWX3lLtJMWeAfitwuRzS9S1RTstmUBHLwY7UWsL5sg4gigoxpxkOJjrhW2OFGG WRZknAWeDwL0VS3dGHIuZ2vPVSQ798uakHpAXr8ObQtDc7Ob2u9voHTX0tnr9Q== ARC-Seal: i=1; a=rsa-sha256; d=iki.fi; s=lahtoruutu; cv=none; t=1795092753; b=SjRTmASuGQq83z4bTpSBE8cyhwlm0jS9YyQETbvB8jsrOtdaziCSRETAkIp/Tw7nrQ02fh N/P4u732yr3AIpqiW01U2hEzOZvH3dLVOHb32JYSbUEPS7ICcn3whtKZRmpfNbz4lZ6bAS Pdtwvr1H0nNUFsRCHLAqXpCMFxZ78SC1N3ZJaXadpgKU7n3zOCbJLUs4RIq2+BxMiPz2jm Y7vuqluRDUZ0ZEYEr8HytyzprCne7hudOKzJFPRzueNW43wuTMez+L+063qVcHfoDfnTC6 bzfn06zfzqSTjLzKBUNJWBEWknr8fluOThP0jVcSBrJOcKEJov5P4AfgRy5ydA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1795092753; 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=qSPFqrDKQyonK4JPL7GjSb7lMO/12bbm7c852nGry18=; b=qKFr6H3w13U6X2niTK+4x7265ePNPqvFXLO5HY87jYH2LIuEAWG0d2qO6dPNZQ5diwPOdA scuCgw8/6O4yRxawRMGD/ZCudCYL76ee9+gQBxDDH/Ihl74VVok/ulHZoNJIq/PAr9f/qq FRmvVSz9AzVKHRR7n8Qa9ISQqkk7Jy4UEEuKRuAwVsY48y13RJWoXAuwxOqvsrDw6pj8mA Vz/p6IMyBQIsUp/YuZlh7Am/sD5wv0AyJ1ny6+KiAMHjxbBDiqsesTQYnz+YYtI7epoec6 QsXQtXT7q8Cfd3ODJzmDbyHBsZO2svzjqgPTEDBnUcpnWfsibQHnhVIpRKKxPQ== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi Message-ID: Date: Thu, 19 Nov 2026 14:52:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Typos in smgr.c To: Chao Li , =?UTF-8?B?0KHQtdGA0LPQtdC5INCo0LjQvdC00LXRgNGD0Lo=?= Cc: PostgreSQL Hackers References: Content-Language: en-US From: Heikki Linnakangas In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 29/07/2026 10:37, Chao Li wrote: >> On Jul 29, 2026, at 15:21, Сергей Шиндерук wrote: >> >> Hello, >> >> while reading the code I spotted a couple of typos in smgr.c. Please see attached. >> >> Looks like PgAioTargetData.smgr.skip_fsync is not used anywhere. >> >> Best regards, >> Sergey Shinderuk >> https://postgrespro.com/ >> >> > > 1. > ``` > - * If more than one block is intended to be read, callers need to use > + * If more than one block is intended to be written, callers need to use > ``` > > Yep, this seems like a copy-pasto. > > 2. > ``` > @@ -1053,7 +1053,7 @@ pgaio_io_set_target_smgr(PgAioHandle *ioh, > sd->smgr.nblocks = nblocks; > sd->smgr.is_temp = SmgrIsTemp(smgr); > /* Temp relations should never be fsync'd */ > - sd->smgr.skip_fsync = skip_fsync && !SmgrIsTemp(smgr); > + sd->smgr.skip_fsync = skip_fsync || SmgrIsTemp(smgr); > ``` > > This is actually a bug fix. The current code incorrectly sets skip_fsync to false for every temporary relation, but temporary relations should not be fsynced. Yep, committed. > Maybe worth adding a test under src/test/modules/test_aio. It's a bit hard to come up with a sensible test because "skip_fsync" is currently unused. - Heikki