Обсуждение: memory leak with Abort Transaction
Hello! A background postgres porocess gets larger with Abort Transactions. Memory seems to leak. This occurs also on 6.3.2. You can see it with user aborts: ======================================================================== #!/bin/sh yes 'begin; abort;' | psql regression ======================================================================== And with internal aborts: ======================================================================== #!/bin/sh yes "insert into Room (roomno) values ('000');" | psql regression ======================================================================== Regards -- ASCII CORPORATION Technical Center SHIOZAKI Takehiko <takehi-s@ascii.co.jp>
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). Regards [On Nov 13, takehi-s@ascii.co.jp (SHIOZAKI Takehiko) writes:] >Hello! > >A background postgres porocess gets larger with Abort Transactions. >Memory seems to leak. >This occurs also on 6.3.2. > >You can see it with user aborts: > >======================================================================== >#!/bin/sh > >yes 'begin; >abort;' | psql regression >======================================================================== > >And with internal aborts: > >======================================================================== >#!/bin/sh > >yes "insert into Room (roomno) values ('000');" | psql regression >======================================================================== > >Regards > >-- >ASCII CORPORATION >Technical Center >SHIOZAKI Takehiko ><takehi-s@ascii.co.jp> -- ASCII CORPORATION Technical Center SHIOZAKI Takehiko <takehi-s@ascii.co.jp>
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) #
> Hello! > > A background postgres porocess gets larger with Abort Transactions. > Memory seems to leak. > This occurs also on 6.3.2. > > You can see it with user aborts: > > ======================================================================== > #!/bin/sh > > yes 'begin; > abort;' | psql regression > ======================================================================== > > And with internal aborts: > > ======================================================================== > #!/bin/sh > > yes "insert into Room (roomno) values ('000');" | psql regression > ======================================================================== Addd to TODO: * fix memory leak in aborted transactions -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
Added to TODO list. > 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). > > Regards > > [On Nov 13, takehi-s@ascii.co.jp (SHIOZAKI Takehiko) writes:] > >Hello! > > > >A background postgres porocess gets larger with Abort Transactions. > >Memory seems to leak. > >This occurs also on 6.3.2. > > > >You can see it with user aborts: > > > >======================================================================== > >#!/bin/sh > > > >yes 'begin; > >abort;' | psql regression > >======================================================================== > > > >And with internal aborts: > > > >======================================================================== > >#!/bin/sh > > > >yes "insert into Room (roomno) values ('000');" | psql regression > >======================================================================== > > > >Regards > > > >-- > >ASCII CORPORATION > >Technical Center > >SHIOZAKI Takehiko > ><takehi-s@ascii.co.jp> > > > -- > ASCII CORPORATION > Technical Center > SHIOZAKI Takehiko > <takehi-s@ascii.co.jp> > > -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026