Re: pg_dump on older version of postgres eating huge

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_dump on older version of postgres eating huge
Дата
Msg-id 2360.1079740555@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_dump on older version of postgres eating huge  (Steve Krall <swalker@iglou.com>)
Ответы Re: pg_dump on older version of postgres eating huge  (Steve Krall <swalker@iglou.com>)
Список pgsql-general
Steve Krall <swalker@iglou.com> writes:
> [root@r-and-d /tmp]# strings core | grep "DROP TRIGGER" | wc -l
> 5450219

> We have alot of triggers, but not 5.5 million :)

Looks like a smoking gun to me ...

Armed with that, I went back to the 7.1 source code, and what I see is a
huge (like O(N^2) in the number of triggers) leak in this routine.  What
it needs is a "resetPQExpBuffer(delqry);" call somewhere in the loop
over triggers.  I'd suggest putting it right before the line

                appendPQExpBuffer(delqry, "DROP TRIGGER %s ", fmtId(tgname, force_quotes));

I see the same leak in 7.2, btw, but it's gone in 7.3.  Didn't look at
prior releases ...

(It seems the reason no one noticed is that the constructed string isn't
actually *used* anyplace.  Sigh.)

            regards, tom lane

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: A way to refer to the "outer" query implicitly?
Следующее
От: Vivek Khera
Дата:
Сообщение: Re: "make check" fails for 7.4.2 checked out from CVS