Re: Uninterruptable regexp_replace in 9.3.1 ?

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Uninterruptable regexp_replace in 9.3.1 ?
Дата
Msg-id 530774E5.5040105@2ndquadrant.com
обсуждение исходный текст
Ответ на Uninterruptable regexp_replace in 9.3.1 ?  (Sandro Santilli <strk@keybit.net>)
Ответы Re: Uninterruptable regexp_replace in 9.3.1 ?  (Florian Pflug <fgp@phlo.org>)
Список pgsql-hackers
On 02/21/2014 05:17 PM, Sandro Santilli wrote:
> The following snippet reveals that 9.3.1 has a bug
> in regexp_matches, which uninterruptably keeps CPU
> spinning for minutes:

Huh. So it does. That's interesting.

(You should generally report things to pgsql-bugs@postgresql.org btw,
not -hackers)

Looks like it's busily looping within the regex.c code, never hitting a
CHECK_FOR_INTERRUPTS.

The real question IMO is why it's taking so long. It looks like
cfindloop(...) is being called multiple times, with each call taking a
couple of seconds.

A profile of the run is attached. I don't expect to have a chance to dig
into this right away, as I haven't touched the regexp code before and
would need to spend a bit of time studying it to achieve anything.
Hopefully the test, confirmation, and profile is useful.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Storing the password in .pgpass file in an encrypted format
Следующее
От: Christopher Browne
Дата:
Сообщение: Re: Storing the password in .pgpass file in an encrypted format