From: Teodor Sigaev Date: Mon, 22 Jul 2019 11:54:29 +0000 (+0300) Subject: fix deleting cell on fly X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;h=7c276460e4a4052e454b9c44148346e7286eb280;p=plantuner.git fix deleting cell on fly --- diff --git a/plantuner.c b/plantuner.c index 1973d01..b22ef9c 100644 --- a/plantuner.c +++ b/plantuner.c @@ -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;