Re: Postgresql out-of-memory error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Postgresql out-of-memory error
Дата
Msg-id 4735.1164124431@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Postgresql out-of-memory error  (Joe Malicki <joe.malicki@metacarta.com>)
Список pgsql-bugs
Joe Malicki <joe.malicki@metacarta.com> writes:
> I have a query that is aborting because of out of memory,

It looks like you've got a couple of different problems:

> TopTransactionContext: 1548738560 total in 197 blocks; 6008 free (189
> chunks); 1548732552 used

Does the INSERT's target table have foreign key constraints?  The
after-trigger event list would explain bloat in TopTransactionContext.
There is not much you can do about that except to insert fewer rows
per statement --- changing plans won't help.

> ExecutorState: 1325826956 total in 175 blocks; 1191164528 free (11490374
> chunks); 134662428 used

This is curious.  I'm inclined to suspect a memory leak in the tsearch2
functions you're using.  Can you provide a self-contained test case?

> ExecutorState: 318758912 total in 47 blocks; 5853360 free (47 chunks);
> 312905552 used

I believe this is probably memory used by the sort step, so it ought to
be more or less bounded by your work_mem setting.  What have you got
that set to?

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #2764: Capital letter in tables or columns not
Следующее
От: Mikko Tiihonen
Дата:
Сообщение: Re: BUG #2768: dates before year 1600 in timestamptz column