puppetlabs/puppetdb — pull request #1033 by kbarber (2014-08-05 19:20:22+00:00)
Title: (PDB-763) Provide trgm index handling for fact_paths

This patch adds a detection routine outside of the normal migration that will
nag the user if they don't have pg_trgm installed (or don't have a compatible
system for trgm and regexp performance, ie. pg 9.3 or above).

If trgm is working, it will manage installing the correct index on the
fact_paths table for regular expression query optimization.

Without a trgm index, globbing and regular expression queries will not use
an index and thus those queries become full table scans.

Signed-off-by: Ken Barber