Re: PostgreSQL / PHP Overrun Error

From: "Brent R(dot) Matzelle" <bmatzelle(at)yahoo(dot)com>
To: Mike Rogers <temp6453(at)hotmail(dot)com>, pgsql-php(at)postgresql(dot)org
Subject: Re: PostgreSQL / PHP Overrun Error
Date: 2001-09-26 20:05:10
Message-ID: 20010926200510.6710.qmail@web13008.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers pgsql-php

--- Mike Rogers <temp6453(at)hotmail(dot)com> wrote:
> I am currently running PHP-4.0.6 (with the memory leak patch
> as posted to
> correct a problem in this release [it is on the download
> page]).
> The script that causes them mostly "includes" other scripts to
> do it's job.
> The home page uses some of the scripts that it uses and I've
> seen the errors
> there too. There errors seem infrequent, and just occur
> randomly... Maybe
> every 2-10 minutes on a reasonably high-volume server. The
> commands that
> seem to be getting executed by the script [it's not my
> script]:
> pg_exec
> pg_errormessage
> pg_fetch_array
> pg_errormessage
> pg_freeresult
> pg_fieldname
> pg_fieldtype
> pg_fieldsize
> pg_cmdtuples
> pg_numrows
> pg_numfields

All of those functions are okay to use except that I would
commment out the calls to pg_freeresult(). I have seen various
older bug reports that have noted that this function can be
troublesome. Plus, PHP frees this memory automatically whether
you call this function or not. I rarely use this function,
unless I am making queries that return enormous amounts of data,
and even then I really do not require it.

Last note, the PHP debug information that you gathered seemed to
be cleaning up the pg_notice memory if I was not mistaken. I
would not be surprised if this function was called by
pg_freeresult.

Brent

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2001-09-26 20:08:08 Re: Bug #467: Can't insert a value of 0 (zero) into a Bytea
Previous Message Mike Rogers 2001-09-26 19:46:16 Re: PostgreSQL / PHP Overrun Error

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-09-26 20:05:44 Re: Spinlock performance improvement proposal
Previous Message D. Hageman 2001-09-26 20:03:11 Re: Spinlock performance improvement proposal

Browse pgsql-php by date

  From Date Subject
Next Message Mike Rogers 2001-09-26 20:42:45 Re: PostgreSQL / PHP Overrun Error
Previous Message Mike Rogers 2001-09-26 19:46:16 Re: PostgreSQL / PHP Overrun Error