pg_amqp
pg_amqp copied to clipboard
Should retry write for EINTR
I have got these error in my postgresql.log:
WARNING: amqp could not commit tx mode on broker 1, reply_type=2, library_errno=4
errno 4 is "EINTR 4 Interrupted system call"
In all honesty, I'm pretty new at coding in C. Your patch to add more info to the warning messages seemed to work ok for me, so I incorporated it into an update. Right now I'm not quite sure how to go about debugging or fixing your issue.
The code in PR #17 should work when standalone. But I have no idea how this interacts with postgres' signal handling. Might have bad interaction with pg_cancel_backend and friends -- i am just not sure.
If this don't work, we need a backend process to handle that reliably..
This should be fixed with the new librabbitmq library in the 0.5.0_dev branch. Please test.