Closed benbro closed 3 years ago
Yea, but looks like it is confusing to do and I should improve it (plus add a test for it!). Pretty sure it is a timeout under the pool_options
, so something like:
pgo:query(Query, Params, #{pool_options => [{timeout, 60000}]})
Isn't this timeout for getting a worker from the pool and not for executing the query? Also, does it make sense to have an option to send a query without waiting for a response?
Na, pretty sure the timeout there is for how long you can hold on to the connection.
I'll try it. thanks.
Is there a way to set a timeout for pgo:query/3? I couldn't find a way to increase it. I have SQL query that deleted many records and takes a long time.