I admit to much head-scratching, erasing my entire ccache cache, the autoconf cache and doing two complete rebuilds from scratch, because I was seeing 40 errors in regression tests. But it turned out to be about this hunk, which was identical to the idea I had while skimming David's original, "hey why don't we just copy the list":
> +/* > + * transformExtendedStatistics > + * handle extended statistics > + * > + * Right now, there's nothing to do here, so we just copy the list. > + */ > static void > transformExtendedStatistics(CreateStmtContext *cxt) > { > - ListCell *lc; > - > - foreach(lc, cxt->extstats) > - cxt->alist = lappend(cxt->alist, lfirst(lc)); > + cxt->alist = list_copy(cxt->extstats); > } > > /* But as it turns out, it's wrong! list_concat() is what is needed here, not list_copy. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services