How to turn off Redshift autocommit from psql

Well Redshift is an odd beast in my humble opinion as the core of it is forked from version 8.0.2 of PostgreSQL long ago. PostgreSQL is at version 13 (at time of writing 2022) in production so that may have happened 10 years or so ago.

But one thing appears to work as expected. Autocommit in psql client is on by default. You can turn off autocommit as follows from a psql prompt:

\set AUTOCOMMIT off
\echo :AUTOCOMMIT

Here is a better post than mine on the subject.

https://dzone.com/articles/autocommit-in-postgresqls-psql

Reference to psql documentation:

https://www.postgresql.org/docs/current/app-psql.html

Leave a Comment

Scroll to Top