postgres.async
postgres.async copied to clipboard
Timeouts?
Is there a way to specify timeouts?
Short answer: Currently no.
Long answer: What timeouts are you referring to? You can of course use core.async (timeout) and (alts!) but there is currently no way to cancel a running query. Cancelation is a fairly heavy operation as it means opening a new physical connection to the postgresql server.
Doesn't postgres have something for timeouts? For example, any operation that takes longer than 1s would be canceled/timedout by postgres.
I could use core.async's timeout, but mixing that with insert/update operations is not that advised.