Re: Some regular-expression performance hacking

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2021-02-23T18:36:16Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2021-02-23 13:09:18 -0500, Tom Lane wrote:
>> Oddly, I see no such warning with Fedora's current compiler,
>> gcc version 10.2.1 20201125 (Red Hat 10.2.1-9) (GCC)
>> Are you using any special compiler switches?

> A few. At first I didn't see any relevant ones - but I think it's just
> that you need to use -O3 instead of -O2.

Ah-hah, -O3 plus remembering to disable assertions makes it
happen here too.  Will fix.

			regards, tom lane



Commits

  1. Suppress unnecessary regex subre nodes in a couple more cases.

  2. Improve memory management in regex compiler.

  3. Extend a test case a little

  4. Allow complemented character class escapes within regex brackets.

  5. Suppress compiler warning in new regex match-all detection code.

  6. Avoid generating extra subre tree nodes for capturing parentheses.

  7. Convert regex engine's subre tree from binary to N-ary style.

  8. Fix regex engine to suppress useless concatenation sub-REs.

  9. Recognize "match-all" NFAs within the regex engine.

  10. Invent "rainbow" arcs within the regex engine.

  11. Make some minor improvements in the regex code.

  12. Display the time when the process started waiting for the lock, in pg_locks, take 2

  13. README/C-comment: document GiST's NSN value

  14. doc: Mention NO DEPENDS ON EXTENSION in its supported ALTER commands