using copy_data which is preferred by pg gem

Thanks for the new branch!

Pg gem recommends the use of copy_data in newer versions, because it better handles closing the operation.  

https://bitbucket.org/ged/ruby-pg/src/30da9c169efc3985ad0464936483c229faba0e33/lib/pg/connection.rb?at=v0.17.0#cl-97