Sync timing out

Redshift has a bug, when you have a view that references a bunch of spectrum tables, it takes extremely long to plan the query before returning nothing to the metabase simple-select-probe-query

SELECT TRUE AS "_" FROM myview WHERE 1<>1 LIMIT 0

One of my views takes 13 minutes... yes 13 minutes. Problem is, sync gets auto cancelled after EXACTLY 20 minutes by deref-with-timeout I'm guessing. So after 20 minutes I get a bunch of these errors and only 4 out of 50 schemas show up in metabase for my redshift connection.

ERROR metabase.driver.redshift Error checking schema permissions com.amazon.redshift.util.RedshiftException: This statement has been closed.

So how do I increase the 20 minute timeout this page is talking about? If there's no config option for it can you point me to where it's hardcoded and I'll just fork?

I realized having this call at all is completely useless for my case and I had my ops guy start pulling the source and building the docker manually so we could scrap this one function. Much better now, my redshift isn't going batty once a day with thousands of select statements.

So you say that metabase take a long time to sync the spectrum layer? First time we hear about that