pg_amqp icon indicating copy to clipboard operation
pg_amqp copied to clipboard

Should retry write for EINTR

Open j16sdiz opened this issue 8 years ago • 3 comments

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"

j16sdiz avatar Mar 16 '16 02:03 j16sdiz

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.

keithf4 avatar Mar 16 '16 03:03 keithf4

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..

j16sdiz avatar Mar 16 '16 04:03 j16sdiz

This should be fixed with the new librabbitmq library in the 0.5.0_dev branch. Please test.

keithf4 avatar Mar 30 '16 21:03 keithf4