Re: WIP: index support for regexp search

Heikki Linnakangas <hlinnakangas@vmware.com>

From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Erik Rijkers <er@xs4all.nl>, Tom Lane <tgl@sss.pgh.pa.us>, Tomas Vondra <tv@fuzzy.cz>, pgsql-hackers@postgresql.org, pavel.stehule@gmail.com
Date: 2013-01-22T19:37:38Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix filling of postmaster.pid in bootstrap/standalone mode.

  2. Add explicit casts in ilist.h's inline functions.

Attachments

On 18.12.2012 09:04, Alexander Korotkov wrote:
> Bug is found and fixed in attached patch.

I finally got around to look at this. I like this new version, without 
the path matrix, much better.

I spend quite some time honing the code and comments, trying to organize 
it so that it's easier to understand. In particular, I divided the 
processing more clearly into four separate stages, and added comments 
indicating which functions and which fields in the structs are needed in 
which state.

I understand the other stages fairly well now, but the transformation 
from the source CNFA form into the transformed graph is still a black 
box to me. The addKeys/addArcs functions still need more explanation. 
Can you come up with some extra comments or refactoring to clarify those?

I'd like to see a few more regression test cases, to cover the various 
overflow cases. In particular, I built with --enable-coverage and ran 
"make installcheck", and it looks like the state merging code isn't 
exercised at all. Report attached.

To visualize the graphs, I rewrote the debugging print* functions to 
write the graphs in graphviz .dot format. That helped a lot. See 
attached graphs, generated from the regexp '^(abc|def)(ghi|jk[lmn])$'.

There's still a lot of cleanup to do, I'm going to continue working on 
this tomorrow, but wanted to shared what I have this far.

- Heikki