Should anybody try to take a look at rubygem-pg, I have already did that:
https://bugzilla.redhat.com/show_bug.cgi?id=2324182
and moved the ticket to PostgreSQL for the moment. Please take the ticket as a good starting point, because the funny thing is that the issue seems to be related to kernel version. Any help with debugging this further is greatly appreciated.
Vít