Postgres AUTOCOMMIT is ON on 2 databases, but "there is no transaction in progress" output on 1 database

1.1k Views Asked by At

I have a postgres db in a few different environments (i.e. dev, qa, prod).

Both databases have AUTOCOMMIT ON (checked in psql using \echo :AUTOCOMMIT command)

My question one of my databases that should have identical settings is outputting in the output window of my DB client IDE (Dbeaver)

there is no transaction in progress

....If I do a random commit; in the query editor. However, if I do this same commit; in my other db that should same settings, nothing is output in the Window.

Is there a specific settings that controls this output message? Or am I missing something here?

1

There are 1 best solutions below

0
Laurenz Albe On

DBeaver has a button somewhere in the middle of the button bar to disable autocommit. This is activated in one of the cases and deactivated in the other. PostgreSQL itself has no way to disable autocommit, this is always done on the client side (like with \set AUTOCOMMIT off in psql). Changing the setting in one client won't change the setting in another client.

I highly recommend that you keep autocommit enabled everywhere to avoid breaking your database with interactive sessions that inadvertently keep transactions open.