Re: PL/pgSQL Memory Management?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Command Prompt, Inc(dot)" <pgsql-general(at)commandprompt(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PL/pgSQL Memory Management?
Date: 2002-02-22 02:43:53
Message-ID: 13206.1014345833@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Command Prompt, Inc." <pgsql-general(at)commandprompt(dot)com> writes:
> I have a client that was using a PL/pgSQL function called html_linebreaks
> to translate newlines into (X)HTML <br/> tags, and he ran into a serious
> memory issue today which actually brought down his Linux server.

FWIW, I've now tried this in 7.2, and it doesn't seem to leak memory;
but it is unreasonably slow ... which is not too surprising considering
the number of cycles you are expending per byte. plpgsql is not a good
text-processing language. This function would be a one-liner in either
plperl or pltcl, and tremendously more efficient too.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-02-22 02:46:25 Re: Createdb problems
Previous Message Tom Lane 2002-02-22 02:13:08 Re: query optimization Anyone know a better way to run this query