aktungmak

Results 11 comments of aktungmak

Yes, I completely agree - resolving remote resources should be an optional flag. I will fork and send you some PRs with any improvements I can make.

If we don't have that clause, then the worker will crash any time it receives a message other than the 'EXIT' from epgsql_sock. When using pgapp:with_transaction this can occur since...

I didn't get a chance to write some proper example code to reproduce it, but essentially this is how the issue is triggered: `pgapp:with_transaction(fun() -> self() ! {'EXIT', self(), normal}...

The code was using a library that was spawn_linking other processes which then finished normally, and since the pgapp_worker process is trapping exits it was receiving `{'EXIT', Pid, normal}` messages....

We have refactored the code that was using the other library to perform the work outside the transaction now, which avoid the issue in this particular case.

The only problem will be as I mentioned above, that the worker will crash if it receives any other messages inside the transaction function (eg if a spawn_linked process finishes...

I have a fix for this issue in progress, I will submit a PR tomorrow if all is well.

PR #27 seems to fix this, I will double check with a full test in the rest of the application code to make sure there is nothing I have missed.

I have tested and all looks good to me! Feel free to merge #27 at your convenience.