Re: refcnt leak ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: refcnt leak ?
Date
Msg-id 5974.973610154@sss.pgh.pa.us
Whole thread Raw
In response to refcnt leak ?  (Hiroshi Inoue <Inoue@tpf.co.jp>)
Responses Re: refcnt leak ?  (Karel Zak <zakkr@zf.jcu.cz>)
RE: refcnt leak ?  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-hackers
Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> 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;

That doesn't look like a problem to me --- the result relations *have*
been closed, just above this line.

> BTW,doesn't EndAppend() neglect to call ExecCloseIndices()
> for RelationInfos of appendstate->as_result_relation_info_list ?

Comparing nodeAppend to EndPlan(), I think you are right --- each
resultinfo should have ExecCloseIndices applied too, in the loop just
above the line you quote.  This did not use to be a problem because
Append plans were readonly, but now that we have UPDATE/DELETE on
inheritance hierarchies, there's a missing step here.  Was your test
query of that kind?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: AW: v7.0.3 *pre-release* ...
Next
From: Zeugswetter Andreas SB
Date:
Subject: AW: AW: v7.0.3 *pre-release* ...