title: What is the fastest way to insert data into postgres using pqxx
body: <p>I'm using <code>pqxx</code> as an api to access <code>postgres</code> from c++ code. I'm trying to insert a large amount of data and am finding the performance isn't good enough. I've tried several things and nothing is giving the performance that I need.</p>
  
  <p>I've been trying to use <code>pqxx::pipeline</code> to get asyn inserts, but it seams with this, I can either wait until the end of all inserts to commit the transaction in which case I run the risk of losing a very large amount of data if the process crashes before the commit. Or I can commit occasionally (like every 5 minutes) in which case I have a blocking call every 5 minutes which takes quite a large amount of time.</p>
  
  <p>Is there a way to do this without having a transaction, or to have asynchronous commits for my transaction?</p>