refcnt leak ? - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject refcnt leak ?
Date
Msg-id 3A07DAE5.4C0FF4F2@tpf.co.jp
Whole thread Raw
Responses Re: refcnt leak ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Zeugswetter Andreas SB
Date:
Subject: Again please no // comments !!!!!!!!
Next
From: Pete Forman
Date:
Subject: AW: v7.0.3 *pre-release* ...