Memory deallocation after calling cast function

From: Soroosh Sardari <soroosh(dot)sardari(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Memory deallocation after calling cast function
Date: 2014-06-03 08:51:06
Message-ID: CAFUsPDZQLHKetjY2iG0MZK9R2oK72xcYVpARWoxc49Z6jLUgBQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

I have problem with memory deallocation. look at the following queries

1- create table test01(a) as select generate_series(1,100000000)::int8 ;

2- create table test02(a) as select generate_series(1,100000000) ;

In execution of first query, memory usage increase rapidly until the
transaction comes to end and deallocate all the memory which allocated with
palloc.
I have wondered why all the memory deallocated at the end, so the cast is
removed and query executed again. memory usage was not the same. It was
grow very slow.

I need help to find the right point to deallocate the memory,
Any idea will be appreciated.

Soroosh Sardari

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2014-06-03 09:38:24 Re: pg_stat directory and pg_stat_statements
Previous Message Peter Geoghegan 2014-06-03 08:21:51 Re: 9.4 release notes