Elaborate the context!
Remove some debugging stuffs.
See if this fairs better to avoid ActiveRecord/PostgreSQL bugs?