"Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> writes:
> Oh no,my point isn't on this line but on the line
> estate->es_result_relation_info = NULL;
Oh, I see --- this is mistakenly assuming that es_result_relation_info
*always* points at one of the Append's relations. So there are actually
two rel-refcnt-leaking bugs here, this one and the lack of index close.
I've fixed both. Thanks for the report!
regards, tom lane