Skip site navigation (1) Skip section navigation (2)

Re: ERROR: invalid memory alloc request size <a_big_number_here>

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Matteo Beccati <php(at)beccati(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,Martijn van Oosterhout <kleptog(at)svana(dot)org>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: ERROR: invalid memory alloc request size <a_big_number_here>
Date: 2005-10-27 21:44:30
Message-ID: 20051027214429.GA19093@surnet.cl (view raw or flat)
Thread:
Lists: pgsql-hackers
Matteo Beccati wrote:
> Tom, Alvaro
> 
> >>The remaining question for me is, how do we sleep until the correct
> >>offset has been stored?
> >
> >I was thinking of just pg_usleep for some nominal time (1ms maybe)
> >and try to read the offsets page again.  This is a corner case so
> >the performance doesn't have to be great.
> 
> Let me know if you need to test some other patches.

Ok.  I had hoped to reproduce the problem with pristine sources, in
order to verify that I was able to show it not appearing with my patch.
However I have been unable to create a situation in which the problem
appears.  So I attach the patch that I came up with.  Please test it.

I added a loop counter, to verify that we don't loop indefinitely.  I'm
not sure that it's the best way to do it, but I'm too coward to leave it
without any check.

-- 
Alvaro Herrera                           Developer, http://www.PostgreSQL.org
"La soledad es compañía"

In response to

Responses

pgsql-hackers by date

Next:From: gjDate: 2005-10-27 22:21:52
Subject: Re: _penalty gist method invoked with one key NULL
Previous:From: Tom LaneDate: 2005-10-27 21:44:24
Subject: Re: _penalty gist method invoked with one key NULL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group