Confusion regarding autocommit

From: siddharth yanamandra <yanamandra(dot)siddharth(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Confusion regarding autocommit
Date: 2019-04-10 09:09:49
Message-ID: CAPSyZB9ziu=jhX60A7bAgaycCOetos_pV4u_exqDzC+vXqO4XA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi

We have an application which used the jdbc 8.2-504 version. We have
recently tried to update it to 42.2.5 jre 7 version. During this update we
faced the issue "could not commit when autocommit is enabled" error so we
have decided to assign false to autocommit during connection initiation.
Now many of the SQL statements we use are select statements and we have
read from many sources that even select statements should be committed to
clear locks on tables. Is this necessary or is it ok to just close the
connection after the operations are done(for select statements only).

Thanks in advance

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Mark Rotteveel 2019-04-10 12:28:28 Re: Confusion regarding autocommit
Previous Message Dave Cramer 2019-04-09 19:08:08 [pgjdbc/pgjdbc] 129960: remove reference to unknown google group (#1429)