I have created my first patch for predicate locking in gist index. It includes a test for verification of serialization failures and a test to check false positives.
I am submitting my patch little late because there were some issues with "make check" that I was trying to solve. Now, the patch passes all existing tests.