title: What is ROW EXCLUSIVE in PostgreSQL exactly?
body: <p>I understand that PostgreSQL inserts use ROW EXCLUSIVE locks, does that mean that inserts can be in parallel, and that one insert won't lock up the entire table?</p>
  
  <p>Table in question has a primary key generated outside of DB and no additional indexes (but I'm curious what would happen if that wasn't the case).</p>
  
  <p><strong>Edit 1:</strong></p>
  
  <p>Per documentation, ROW EXCLUSIVE conflicts with SHARE which is acquired by CREATE INDEX.</p>
  
  <p>Does this mean that if the table has index, insert will lock up the entire table?</p>
  
  <p>Or will the table be locked only when creating the index first time?</p>
  
  <p>Also, as I understand now, primary key is also an index, right?</p>