More indexes don't always mean faster queries. Adding eight indexes to a test table slowed inserts by 14×, turning a 2-minute operation into 27 minutes.
Redirect PostgreSQL's statistics collector to a RAM disk and slash write I/O to your database volume. It's a free performance win that survives normal restarts.
PostgreSQL 9.5's new UPSERT syntax doesn't work with COPY, but you can achieve the same result using file_fdw to mount CSV files as foreign tables and combine…