I've noticed that this patch needs a review and decided to take a look. Here is a short summary:
* Patches apply to the master branch. There are a trailing whitespaces, though. * All tests pass. * I see 8-10% performance improvement on full text search queries. * It seems that there is no obvious performance degradation on regular queries (according to pgbench).