title: Insert inside transaction causing Exclusive lock
body: <p>I am doing a simple insert row inside of a transaction, here is the steps that I followed</p>
  
  <ul>
  <li>begin;</li>
  <li>insert data</li>
  <li>query pg_locks</li>
  </ul>
  
  <p>The pg_locks now says that there is an Exclusive lock as in the picture below.</p>
  
  <p>According to the documentation an Exclusive Lock is only Acquired by refresh materialized view concurrently.</p>
  
  <p>What am I doing wrong here?</p>
  
  <p>Using pgsql - 9.4</p>
  
  <p>Pg Locks table before insert has four rows, this is due to querying the pg_locks table itself in two separate sessions.</p>
  
  <p>After insert it has two extra rows, one which is the actual transaction id itself which is an exclusive lock and another is on relation RowExclusiveLock</p>