title: Duplicate key value violates unique constraint "hibernate_sequences_pkey" exception by Postgres
body: <p>My Spring Data (JPA/Hibernate) based application raises on increased load when persisting new entities in the Postgres the following exception: 
  org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "hibernate_sequences_pkey"</p>
  
  <p>The strategy for id is defined as follows:</p>
  
  <pre><code>@Id
  @GeneratedValue(strategy = GenerationType.TABLE)
  @Column(name = "ID")
  public Long getId() {
      return id;
  }
  </code></pre>
  
  <p>I know that this strategy is not the perfect solution for Postgres, however is it the reason for the exception above?</p>
  
  <p>The load is generated using Apache Camel route with splitter running inserts in parallel on multiple threads.</p>