From: Сергей Шиндерук <s.shinderuk@postgrespro.ru>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Typos in smgr.c
Date: Wed, 29 Jul 2026 10:21:30 +0300
Message-ID: <A96F1990-57F8-4566-B55D-43D6087EE313@postgrespro.ru> (raw)
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/Attachments:typos-in-smgr.diff (application/octet-stream, 881B) downloaddiff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.cindex 5391640d861..0b522a49564 100644--- a/src/backend/storage/smgr/smgr.c+++ b/src/backend/storage/smgr/smgr.c@@ -784,7 +784,7 @@ smgrstartreadv(PgAioHandle *ioh,
* fsync the relation, so we needn't bother. Temporary relations also
* do not require fsync.
*
- * 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
* smgrmaxcombine() to check how many blocks can be combined into one IO.
*/
void
@@ -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);
}
/*
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: s.shinderuk@postgrespro.ru
Subject: Re: Typos in smgr.c
In-Reply-To: <A96F1990-57F8-4566-B55D-43D6087EE313@postgrespro.ru>
References: <A96F1990-57F8-4566-B55D-43D6087EE313@postgrespro.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox