Re: BUG #16443: Too much memory usage on insert query

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16443: Too much memory usage on insert query
Дата
Msg-id 1360.1589730053@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #16443: Too much memory usage on insert query  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #16443: Too much memory usage on insert query  (Kurt Roeckx <kurt@roeckx.be>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> I was executing this query:
> insert into ct_entry_chain (ct_entry_id, certificate_id) select id,
> unnest(certificate_chain_id) from ct_entry;

How much data is that?

> The process was using at least 14 GB, of the 8 GB of RAM that's available.

My first guess is that the space was being eaten by trigger list entries
to verify the foreign-key constraints on the target table.  You might be
better advised to fill the new table first and then create its FK
constraints.  (Building the indexes afterwards wouldn't be a bad idea,
either.)

We are looking at better mechanisms for handling FK verification, but
that won't see the light of day before v14 at the earliest.

            regards, tom lane



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

Предыдущее
От: Kurt Roeckx
Дата:
Сообщение: Re: BUG #16443: Too much memory usage on insert query
Следующее
От: Kurt Roeckx
Дата:
Сообщение: Re: BUG #16443: Too much memory usage on insert query