Re: Out of memory error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Out of memory error
Дата
Msg-id 97240.1637733158@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Out of memory error  (aditya desai <admad123@gmail.com>)
Ответы Re: Out of memory error  (aditya desai <admad123@gmail.com>)
Список pgsql-performance
aditya desai <admad123@gmail.com> writes:
> In a trigger function I am creating a temp table . When an update on a
> table is executed for say 10k rows. I get the below error.

> ERROR: out of shared memory
> HINT:You might need to increase max_locks_per_transaction
> CONTEXT: SQL Statement "created temp table changedinfo(colName
> varchar(100), oldValue varchar(4000), newValue varchar(4000)

[ raised eyebrow ... ]  If you are concerned about performance,
I'd start by not creating a temp table per row of the outer update.
That's costing probably 100x to 1000x as much as the row update itself.

            regards, tom lane



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

Предыдущее
От: aditya desai
Дата:
Сообщение: Out of memory error
Следующее
От: aditya desai
Дата:
Сообщение: Re: Out of memory error