Redshift VACUUM cannot run inside a transaction block on SQLWorkbenchJ
For me this worked.
END TRANSACTION;
VACCUM <TABLENAME>;
You don't need to change the connection profile, you can change the autocommit property inside your SQL script "on-the-fly" with set autocommit
set autocommit on;
vacuum;
set autocommit off;
You can also toggle the current autocommit state through the menu "SQL -> Autocommit"