memory leak in auto_explain

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема memory leak in auto_explain
Дата
Msg-id CAMkU=1wCVtbeRn0s9gt12KwQ7PLXovbpM8eg25SYocKW3BT4hg@mail.gmail.com
обсуждение исходный текст
Ответы Re: memory leak in auto_explain  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-hackers
I accidentally tried to populate a test case while auto_explain.log_min_duration was set to zero.  auto_explain.log_nested_statements was also on.  

create or replace function gibberish(int) returns text language SQL as $_$ select left(string_agg(md5(random()::text),$$$$),$1) from generate_series(0,$1/32) $_$;

create table j1 as select x, md5(random()::text) as t11, gibberish(1500) as t12 from generate_series(1,20e6) f(x);

I got logorrhea of course, but I also got a memory leak into the SQL function context:

  TopPortalContext: 8192 total in 1 blocks; 7656 free (0 chunks); 536 used
    PortalContext: 16384 total in 5 blocks; 5328 free (1 chunks); 11056 used: <unnamed>
      ExecutorState: 4810120 total in 13 blocks; 4167160 free (74922 chunks); 642960 used
        SQL function: 411058232 total in 60 blocks; 4916568 free (4 chunks); 406141664 used: gibberish

The memory usage grew until OOM killer stepped in.

Cheers,

Jeff

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

Предыдущее
От: Jacob Champion
Дата:
Сообщение: Re: Proposal: Save user's original authenticated identity for logging
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: memory leak in auto_explain