Re: Out of Memory during Insert

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Out of Memory during Insert
Дата
Msg-id 20969.1269441005@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Out of Memory during Insert  (yue peng <pengyuebupt@gmail.com>)
Список pgsql-general
yue peng <pengyuebupt@gmail.com> writes:
> I encountered an out of memory error during executing un INSERT into
> table1(v1,v2,v3) SELECT  c1,c2,c3 from table2 where .....

Most likely the OOM is because of growth of the pending-trigger-event
queue --- do you have any foreign key references in that table?

Possible solutions are to insert fewer rows at a time, or to drop the FK
constraint and then re-create it after you do the bulk insertion.

You might also try updating to a newer PG version ... 8.4 and later use
only 12 bytes per pending INSERT trigger not 40.  That's not necessarily
going to be enough to fix this particular case, of course.

            regards, tom lane

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

Предыдущее
От: Frank jansen
Дата:
Сообщение: Re: Concatenate [solved]
Следующее
От: Bryan Murphy
Дата:
Сообщение: Re: Warm Standby Setup Documentation