The fact that we need to burn 100ms per row doing nothing raises some questions about this approach. Why does #put_copy_data return before the connection is writable again? What happens when 100ms is not enough time? We are able to write and then read several hundred rows per second using the existing code. Won't this necessarily slow the process down by a factor of 10 at least?