Re: ERROR: invalid memory alloc request size

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: ERROR: invalid memory alloc request size
Дата
Msg-id 20051027214429.GA19093@surnet.cl
обсуждение исходный текст
Ответ на Re: ERROR: invalid memory alloc request size  (Matteo Beccati <php@beccati.com>)
Ответы Re: ERROR: invalid memory alloc request size  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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"

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: enums
Следующее
От: Tom Lane
Дата:
Сообщение: Re: _penalty gist method invoked with one key NULL