Re: out of memory woes

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: out of memory woes
Дата
Msg-id 17733.1166386165@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: out of memory woes  ("Angva" <angvaw@gmail.com>)
Список pgsql-general
"Angva" <angvaw@gmail.com> writes:
> Here is the sole plpgsql function that was called when the error
> occurred. This function is intended to be called from a shell script in
> order to cluster tables in parallel processes.

OK, I played around with this for a bit, and what I find is that in 8.1,
that SPIExec context is where the sort operation run by CLUSTER's
reindexing step allocates memory.  So the short answer is "you've got
maintenance_work_mem set too high".  I don't know why it sometimes fails
and sometimes not --- maybe you are reaching the swap-space limits of
the machine when you do several of these in parallel?  But there doesn't
seem to be any actual leak here.

BTW, it's also the case that the 8.1 sort code isn't great about
measuring its space usage.  I had maintenance_work_mem set to 100MB
and saw actual process size exceeding 200MB ... IIRC, that's been
improved in 8.2.

            regards, tom lane

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

Предыдущее
От: Bob Pawley
Дата:
Сообщение: Creating an Application
Следующее
От: Gene
Дата:
Сообщение: fedora core 6 startup script for pg 8.2