Fix a typo in md.c

Started by Masahiko Sawadaover 2 years ago3 messages
#1Masahiko Sawada
sawada.mshk@gmail.com
1 attachment(s)

Hi,

I've attached the patch for $subject. In the following comment,

/*
* If available and useful, use posix_fallocate() (via FileAllocate())
* to extend the relation. That's often more efficient than using
* write(), as it commonly won't cause the kernel to allocate page
* cache space for the extended pages.
*
* However, we don't use FileAllocate() for small extensions, as it
* defeats delayed allocation on some filesystems. Not clear where
* that decision should be made though? For now just use a cutoff of
* 8, anything between 4 and 8 worked OK in some local testing.

s/FileAllocate()/FileFallocate()/

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

Attachments:

fix_typo_md.patchapplication/octet-stream; name=fix_typo_md.patchDownload
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index 65bb22541c..7353ed31d8 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -564,12 +564,12 @@ mdzeroextend(SMgrRelation reln, ForkNumber forknum,
 		Assert(segstartblock + numblocks <= RELSEG_SIZE);
 
 		/*
-		 * If available and useful, use posix_fallocate() (via FileAllocate())
+		 * If available and useful, use posix_fallocate() (via FileFallocate())
 		 * to extend the relation. That's often more efficient than using
 		 * write(), as it commonly won't cause the kernel to allocate page
 		 * cache space for the extended pages.
 		 *
-		 * However, we don't use FileAllocate() for small extensions, as it
+		 * However, we don't use FileFallocate() for small extensions, as it
 		 * defeats delayed allocation on some filesystems. Not clear where
 		 * that decision should be made though? For now just use a cutoff of
 		 * 8, anything between 4 and 8 worked OK in some local testing.
#2Michael Paquier
michael@paquier.xyz
In reply to: Masahiko Sawada (#1)
Re: Fix a typo in md.c

On Wed, Jun 14, 2023 at 06:33:18AM +0900, Masahiko Sawada wrote:

I've attached the patch for $subject. In the following comment,

LGTM.
--
Michael

#3Masahiko Sawada
sawada.mshk@gmail.com
In reply to: Michael Paquier (#2)
Re: Fix a typo in md.c

On Wed, Jun 14, 2023 at 9:19 AM Michael Paquier <michael@paquier.xyz> wrote:

On Wed, Jun 14, 2023 at 06:33:18AM +0900, Masahiko Sawada wrote:

I've attached the patch for $subject. In the following comment,

LGTM.

Thanks, pushed.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com