postgres.async icon indicating copy to clipboard operation
postgres.async copied to clipboard

Timeouts?

Open donbonifacio opened this issue 9 years ago • 2 comments

Is there a way to specify timeouts?

donbonifacio avatar Jun 11 '15 08:06 donbonifacio

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.

alaisi avatar Jun 11 '15 18:06 alaisi

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.

donbonifacio avatar Jun 11 '15 19:06 donbonifacio