Re: [HACKERS] Re: memory leak with Abort Transaction - Mailing list pgsql-hackers

From jwieck@debis.com (Jan Wieck)
Subject Re: [HACKERS] Re: memory leak with Abort Transaction
Date
Msg-id m0zj13G-000EBfC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to Re: memory leak with Abort Transaction  (SHIOZAKI Takehiko <takehi-s@ascii.co.jp>)
List pgsql-hackers
SHIOZAKI Takehiko wrote:

>
> Hello!
>
> Releasing 6.4.1 is a good news.
> But would you confirm the following "memory leak" problem?
> It is reproducable on 6.4 (FreeBSD 2.2.7-RELEASE).

    It's  an far too old problem. And as far as I remember, there
    are different locations in the code causing it.

    One place I remember well.  It's  in  the  tcop  mainloop  in
    PostgresMain().  The querytree list is malloc()'ed (there and
    in the parser) and free()'d after the query  is  processed  -
    except  the  processing of the queries bails out with elog().
    In that case it  never  runs  over  the  free()  because  the
    longjmp() kick's it back to the beginning of the loop.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#======================================== jwieck@debis.com (Jan Wieck) #

pgsql-hackers by date:

Previous
From: SHIOZAKI Takehiko
Date:
Subject: Re: memory leak with Abort Transaction
Next
From: Michael Olivier
Date:
Subject: Linux RPM for 6.4? also join on indexes?