Richard Guo <guofenglinux@gmail.com> writes: >> This can be verified with the attached changes, which would make it work >> for this case.
I don't like this patch too much, because it will result in opening the new index, building an IndexInfo, and closing the index again for each index of each partition. We only need to do that once.
Another thing that struck me as poor practice was not getting the other arguments of CompareIndexInfo (opfamilies and collation) from the new index. At best this is making the code know more than it needs to.
Hence, v2 patch attached, now with a test case.
Thanks. The v2 patch is a good improvement on the two aspects. It's in good shape to me.