Re: Uninterruptable regexp_replace in 9.3.1 ?

Поиск
Список
Период
Сортировка
От Sandro Santilli
Тема Re: Uninterruptable regexp_replace in 9.3.1 ?
Дата
Msg-id 20140221102713.GN6924@localhost
обсуждение исходный текст
Ответ на Uninterruptable regexp_replace in 9.3.1 ?  (Sandro Santilli <strk@keybit.net>)
Список pgsql-hackers
I've just tested 9.3.3 and it is _also_ affected.
Should I report the regression somewhere else ?

--strk;

On Fri, Feb 21, 2014 at 10:17:59AM +0100, Sandro Santilli wrote:
> The following snippet reveals that 9.3.1 has a bug 
> in regexp_matches, which uninterruptably keeps CPU
> spinning for minutes:
> 
> -----8<---------------------------------------------------
> 
> \timing
> SET statement_timeout = 2;
> -- this is only to show statement_timeout is effective here
> SELECT count(*) from generate_series(1, 100000);
> -- this one is uninterruptable!
> SELECT regexp_matches($INPUT$
> 
> 
> 
> 
> 
> 
> 
> 
>     /a
>     $b$
>     $c$d
>     ;
> $INPUT$,
> $REG$((?:[^'"$;]+|"[^"]*"|'(?:[^']*|'')*'|(\$[^$]*\$).*?\2)+)$REG$, 'g' );
> 
> -----8<---------------------------------------------------
> 
> The above has been tested to be harmless with PostgreSQL 9.1.11
> in that the regexp_matches call is interrupted, but it is NOT
> with PostgreSQL 9.3.1.
> 
> Is it a known bug ?
> 
> Please include my address in replies as I don't get notified
> of list activity. Thanks.
> 
> --strk; 
> 
>  ()  ASCII ribbon campaign  --  Keep it simple !
>  /\  http://strk.keybit.net/rants/ascii_mails.txt  



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

Предыдущее
От: Sandro Santilli
Дата:
Сообщение: Uninterruptable regexp_replace in 9.3.1 ?
Следующее
От: Ronan Dunklau
Дата:
Сообщение: Proposal: IMPORT FOREIGN SCHEMA statement.