Fix comment related to concurrent index swapping in index.c
authorMichael Paquier <[email protected]>
Thu, 19 Mar 2020 00:51:33 +0000 (09:51 +0900)
committerMichael Paquier <[email protected]>
Thu, 19 Mar 2020 00:51:33 +0000 (09:51 +0900)
A comment about switching indisvalid of the new and old indexes swapped
in REINDEX CONCURRENTLY got this backwards.

Issue introduced by 5dc92b8, the original commit of REINDEX
CONCURRENTLY.

Author: Julien Rouhaud
Discussion: https://postgr.es/m/20200318143340.GA46897@nol
Back-through: 12

src/backend/catalog/index.c

index 76fd938ce33047b0e70c1bcd43423f8df518c779..023ec7e6188356d695976a96d73061d1601d038f 100644 (file)
@@ -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;