I am working on Amazon Redshift SQL database. When working on this database, I usually run following query, vacuum full <table_Name> Now this query runs properly using Workbench. I want to run this query from tRedshiftRow. I put this same query in tRedshiftRow and run and I get following error, connecting to socket on port 3754 connected ERROR: VACUUM cannot run inside a transaction block disconnected Anybody have idea how to solve this?? Thanks in advance.
Hi xdshi, Thanks for the help, it worked. Can you provide me description why it happens with vacuum query? I mean I know commit every does is to run commit for 'n' no. of rows inserted. From my opinion, vacuum does not insert or update any row. But just clears the rows remaining data or entries in table which stay back after removing old entries. Kind of cleaning unwanted rows. But commit every works for insert and update, thus issue with vacuum.
I know this is an old post but since I had a similar issue I want to say that if you are "reusing a connection" that you lose the option for the "commit every". You need to make it a built in or repository connection of its own so it can have different values than the shared connection.