Re: invalid regexp crashes the server on windows or 9.3 - Mailing list pgsql-hackers

From Erik Rijkers
Subject Re: invalid regexp crashes the server on windows or 9.3
Date
Msg-id 07fe9ef4f29f205d73e9ff7556e64e08.squirrel@webmail.xs4all.nl
Whole thread Raw
In response to invalid regexp crashes the server on windows or 9.3  (Marc Mamin <M.Mamin@intershop.de>)
Responses Re: invalid regexp crashes the server on windows or 9.3
List pgsql-hackers
On Wed, September 25, 2013 09:33, Marc Mamin wrote:
> Hi,
>
> This regexp call freezes with almost 100% CPU usage, so I guess it creates an infinite loop.
>
> With  Postgres 9.1 on Linux, I can kill the backend cleanly and get following message:
>
> cic_db=# select regexp_matches ('aa bb aa ba baa x','(^((?!aa)))+','gx');
> ERROR:  invalid regular expression: nfa has too many states
>
> on Windows and Postgres 9.3, I used the terminate icon from pgAdmin,
> which resulted in a FATAL error, killed all other processes and finally stopped the server.
>
> I guesss this is a windows issue, but we do not have a Postgres 9.3 installation on Linux yet, so that I can't test
it.
>

On 9.3 and 9.4devel, on linux (centos 6.4), that statement / regex returns after ~2 minutes (on a modest desktop) with
that
same error, but not crashing.


Erik Rijkers








pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Minmax indexes
Next
From: David Rowley
Date:
Subject: Re: FW: REVIEW: Allow formatting in log_line_prefix