I am using a generic IDE (JetBrains DataGrip) with Amazon Redshift. When I don't run queries for 20-30 minutes, and return to run a query, I typically get the error message:
[08003] This connection has been closed.
After I get this error message, and immediately try running the query again, the query works. So I gather my first failed attempt reactivates the connection, but then I have to manually rerun the query again to work.
My question: Is there a line of code/query I can insert at the top of my queries to reactivate the connection? I want to avoid this two step manual process when running a query.
Redshift uses: PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.1150
Thanks