title: Loading large data from Postgres table to S3 using Airflow's PostgresHook
body: <p>I'm trying to load data from a Postgres table to S3 using Airflow, the PostgresToS3 operator works for all tables except one which is a very large table. The task runs for some time ~800s and then stops without any logs. This seems to because the connection is getting closed after some timeout period. I tried to do a <code>cursor.execute("SET statement_timeout = 0")</code> before <code>cursor.execute(self.sql)</code> Is there any way I can fix this?</p>
  
  <p><a href="https://airflow.apache.org/docs/stable/_modules/airflow/hooks/postgres_hook.html" rel="nofollow noreferrer">https://airflow.apache.org/docs/stable/_modules/airflow/hooks/postgres_hook.html</a></p>