Turning off AUTOCOMMIT

Assume that you have turned off autocommit and just done one commit at the end when performing multiple INSERTs.

In the given scenario, what will PostgreSQL do if the insertion of one row fails?

  1. The insertion of all rows inserted up to that point would be rolled back.
  2. PostgreSQL only loads partial data.
  3. All insertions are discarded.
  4. None of these

Related Posts