Commit d41202f3 authored by Michael Paquier's avatar Michael Paquier

Fix comment related to concurrent index swapping in index.c

A comment about switching indisvalid of the new and old indexes swapped
in REINDEX CONCURRENTLY got this backwards.

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

Author: Julien Rouhaud
Discussion: https://postgr.es/m/20200318143340.GA46897@nol
Backpatch-through: 12
parent 1f39bce0
...@@ -1531,7 +1531,7 @@ index_concurrently_swap(Oid newIndexId, Oid oldIndexId, const char *oldName) ...@@ -1531,7 +1531,7 @@ index_concurrently_swap(Oid newIndexId, Oid oldIndexId, const char *oldName)
newIndexForm->indisclustered = oldIndexForm->indisclustered; 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. * to what index_set_state_flags() does.
*/ */
newIndexForm->indisvalid = true; newIndexForm->indisvalid = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment