puppetlabs/puppetdb — pull request #1094 by senior (2014-10-02 00:50:31+00:00)
Title: (PDB-900) Make performance improvements to fact_values GC process

Switched from a background thread to cleanup orphaned fact_values to one
that deletes as it goes. Switching to deferred constraints also
significantly improved performance on PostgreSQL. The same facilities are
not available in HSQLDB, but I have alternate queries that work, though
will likely not be as fast.