BUG #17075: Cannot commit when autoCommit is enabled
The following bug has been logged on the website:
Bug reference: 17075
Logged by: dhanabakeeswari v
Email address: dhanabakeeswari15@gmail.com
PostgreSQL version: 11.12
Operating system: Red Hat Enterprise Linux Server (7.8 version)
Description:
I am facing the "Cannot commit when autoCommit is enabled: " issue in the
application level.
I need to disable the auto-commit in the DB level for permanently.
Please help me to solve this
On Mon, Jun 28, 2021 at 11:34 PM PG Bug reporting form
<noreply@postgresql.org> wrote:
I am facing the "Cannot commit when autoCommit is enabled: " issue in the
application level.
I need to disable the auto-commit in the DB level for permanently.
Please help me to solve this
This message isn't coming from postgres. After a quick search it
seems that this is coming from jdbc. In any case, the message is
clear, and is due to a bad usage of the driver.
On Mon, Jun 28, 2021 at 8:34 AM PG Bug reporting form <
noreply@postgresql.org> wrote:
I need to disable the auto-commit in the DB level for permanently.
PostgreSQL does not provide a knob to enable/disable this. If you don't
use an explicit BEGIN your command will commit as soon as it successfully
executes (and will rollback immediately if there is a failure). As Julien
said, though, your driver may be doing stuff above and beyond the SQL
commands you yourself send. Proper usage of you chosen driver/library is
outside the scope of the general PostgreSQL mailing lists (and in any case
this report does not constitute a bug report).
At least, unless you are using libpq directly or somehow manage to get this
to happen in psql.
David J.