Re: Memory Usage

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nathan Barnett <nbarnett(at)centuries(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Memory Usage
Date: 2000-12-08 16:59:35
Message-ID: 973.976294775@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Nathan Barnett <nbarnett(at)centuries(dot)com> writes:
> UPDATE pages SET createdtime = NOW();

> Is there a reason why this would take up all of the memory??

The now() function invocation leaks memory ... only a dozen or so bytes
per invocation, but that adds up over millions of rows :-(. In 7.0.*
the memory isn't recovered until end of statement. 7.1 fixes this by
recovering temporary memory after each tuple.

You'll see the same behavior for functions and operators on any
pass-by-reference datatype, not just timestamp.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2000-12-08 17:07:56 Trip to Japan
Previous Message Tom Lane 2000-12-08 16:55:55 Re: Meaning of EXPLAIN information...?