title: Partial index creation takes the CPU down
body: <p>I am trying to create an index on a table with a couple of million entries. Unfortunately, whenever I try it, the CPU goes up and I have to kill it around 90% CPU utilization, because otherwise it would harm production.</p>
  
  <p>What can I do to create the index then? It's a partial index. I have already set <code>maintenance_work_mem</code> to 2GB. I can't really change <code>checkpoint_segments</code> while the database is running. <code>CREATE INDEX CONCURRENTLY</code> would take the database just down quicker.</p>
  
  <p>So what else could I do?</p>