Thinko in index_concurrently_swap comment

Started by Julien Rouhaudalmost 6 years ago2 messages
#1Julien Rouhaud
rjuju123@gmail.com
1 attachment(s)

Hi,

While looking at RIC for the collation versioning issue Michael raised earlier,
I found a thinko in a nearby comment, apparently introduced in the original
REINDEX CONCURRENTLY patch (5dc92b8). Trivial patch attached.

Attachments:

0001-Fix-comment-in-index_concurrently_swap.patchtext/plain; charset=us-asciiDownload
From 161ea86380a50caeee8de81fe82d6eb106a2fd39 Mon Sep 17 00:00:00 2001
From: Julien Rouhaud <julien.rouhaud@free.fr>
Date: Wed, 18 Mar 2020 15:16:35 +0100
Subject: [PATCH] Fix comment in index_concurrently_swap()

---
 src/backend/catalog/index.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index 76fd938ce3..023ec7e618 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -1531,7 +1531,7 @@ index_concurrently_swap(Oid newIndexId, Oid oldIndexId, const char *oldName)
 	newIndexForm->indisclustered = oldIndexForm->indisclustered;
 
 	/*
-	 * Mark the old index as valid, and the new index as invalid similarly
+	 * Mark the new index as valid, and the old index as invalid similarly
 	 * to what index_set_state_flags() does.
 	 */
 	newIndexForm->indisvalid = true;
-- 
2.20.1

#2Michael Paquier
michael@paquier.xyz
In reply to: Julien Rouhaud (#1)
Re: Thinko in index_concurrently_swap comment

On Wed, Mar 18, 2020 at 03:33:40PM +0100, Julien Rouhaud wrote:

While looking at RIC for the collation versioning issue Michael raised earlier,
I found a thinko in a nearby comment, apparently introduced in the original
REINDEX CONCURRENTLY patch (5dc92b8). Trivial patch attached.

Thanks, Julien. Fixed as of d41202f.
--
Michael