fix deleting cell on fly master
authorTeodor Sigaev <teodor@sigaev.ru>
Mon, 22 Jul 2019 11:54:29 +0000 (14:54 +0300)
committerTeodor Sigaev <teodor@sigaev.ru>
Mon, 22 Jul 2019 11:54:29 +0000 (14:54 +0300)
plantuner.c

index 1973d01..b22ef9c 100644 (file)
@@ -326,6 +326,7 @@ indexFilter(PlannerInfo *root, Oid relationObjectId, bool inhparent,
        {
                ListCell        *l;
 
+restart1:
                foreach(l, rel->indexlist)
                {
                        IndexOptInfo    *info = (IndexOptInfo*)lfirst(l);
@@ -336,7 +337,10 @@ indexFilter(PlannerInfo *root, Oid relationObjectId, bool inhparent,
                                        remove = false;
 
                        if (remove)
+                       {
                                rel->indexlist = list_delete_ptr(rel->indexlist, info);
+                               goto restart1;
+                       }
                }
 
                return;