Postgres speed up index creation for large table
Before I posted this question, I had two tests running but I wasn't sure if they would ever finish. I was hoping to get some insight into how to speed it up if they never finished. Thankfully, one of the tests did finish. I also got good results by trying the suggestions that jjanes posted. 

Using Postgres 9, I ran two tests: 


Inserting the 2 billion entries with indexes
Building indexes for a table that already had the 2 billion entries inserted


The first test has been running for a week and has only inserted 20% of the 2 billion entries. Inserting with index is definitely not the way to go. 

The second test took 45 hours. Without knowing how long index creation was going to take, I prematurely cut off some of the previous tests and never got to see them complete. It takes a long time but for now, I'm happy that it doesn't run on forever. 

Taking jjanes suggestions, I upgraded to Postgres 11, set the parallel workers to 8 and set the maintenance work memory to 7GB. I followed this guide to pick the parameters: https://www.cybertec-postgresql.com/en/postgresql-parallel-create-index-for-better-performance/. 
This sped up the index creation and it only took 35 hours. Shaving off 10 hours was a nice surprise. Thanks!