Fix smgrtruncate code comment.
Today I was busy rebasing my Greenplum-related Extendable SMGR
patches on Cloudberry, and I faced some conflicts.
While resolving them I noticed code & comments inconsistency in smgr.c
in smgrtruncate function, which tracks down to
c5315f4f44843c20ada876fdb0d0828795dfbdf5. In this commit,
smgr_fsm_nblocks & smgr_vm_nblocks fields were removed, however
comments were not fixed accordingly.
So i suggest to fix this, PFA
Attachments:
v1-0001-Fix-smgrtruncate-code-comment.patchapplication/octet-stream; name=v1-0001-Fix-smgrtruncate-code-comment.patchDownload
From bea97f2f35e6f6fce9c4a1c29158fd1433a27680 Mon Sep 17 00:00:00 2001
From: reshke <reshke@double.cloud>
Date: Mon, 29 Jul 2024 10:44:22 +0000
Subject: [PATCH v1] Fix smgrtruncate code comment.
---
src/backend/storage/smgr/smgr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c
index a691aed1f4..e8867f860d 100644
--- a/src/backend/storage/smgr/smgr.c
+++ b/src/backend/storage/smgr/smgr.c
@@ -733,8 +733,8 @@ smgrtruncate(SMgrRelation reln, ForkNumber *forknum, int nforks, BlockNumber *nb
/*
* We might as well update the local smgr_cached_nblocks values. The
* smgr cache inval message that this function sent will cause other
- * backends to invalidate their copies of smgr_fsm_nblocks and
- * smgr_vm_nblocks, and these ones too at the next command boundary.
+ * backends to invalidate their copies of smgr_cached_nblocks,
+ * and these ones too at the next command boundary.
* But these ensure they aren't outright wrong until then.
*/
reln->smgr_cached_nblocks[forknum[i]] = nblocks[i];
--
2.25.1
On 29/07/2024 13:50, Kirill Reshke wrote:
Today I was busy rebasing my Greenplum-related Extendable SMGR
patches on Cloudberry, and I faced some conflicts.
While resolving them I noticed code & comments inconsistency in smgr.c
in smgrtruncate function, which tracks down to
c5315f4f44843c20ada876fdb0d0828795dfbdf5. In this commit,
smgr_fsm_nblocks & smgr_vm_nblocks fields were removed, however
comments were not fixed accordingly.So i suggest to fix this, PFA
Applied, thanks!
--
Heikki Linnakangas
Neon (https://neon.tech)