Hi While examining recursive use of catalog cache,I found a refcnt leak of relations. After further investigation,I found that the following seems to be the cause. [ in EndAppend() in nodeAppend.c ] appendstate->as_result_relation_info_list = NIL; /* * This next step is critical to prevent EndPlan() from trying to close * an already-closed-and-deleted RelationInfo --- es_result_relation_info * is pointing at one of the nodes we just zapped above. */ estate->es_result_relation_info = NULL; This seems to cause a refcnt leak when appendstate->as_result_relation_info_list is NIL from the first e.g. in the case INSERT INTO .. SELECT ... Comments ? BTW,doesn't EndAppend() neglect to call ExecCloseIndices() for RelationInfos of appendstate->as_result_relation_info_list ? Regards. Hiroshi Inoue

Reply via email to