Обсуждение: memory leak with Abort Transaction

Поиск
Список
Период
Сортировка

memory leak with Abort Transaction

От
SHIOZAKI Takehiko
Дата:
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>


Re: memory leak with Abort Transaction

От
SHIOZAKI Takehiko
Дата:
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>


Re: [HACKERS] Re: memory leak with Abort Transaction

От
jwieck@debis.com (Jan Wieck)
Дата:
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) #

Re: [HACKERS] memory leak with Abort Transaction

От
Bruce Momjian
Дата:
> 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
 


Re: [HACKERS] Re: memory leak with Abort Transaction

От
Bruce Momjian
Дата:
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