Re: [HACKERS] Cancel race condition

2015-06-11 Thread Shay Rojansky
Thanks for the extra consideration Robert. Since I'm implementing a generic driver, users can send either single-statement transactions or actual multiple-statement transaction. However, whether we're in a transaction or not doesn't seem to affect Npgsql logic (unless I'm missing something) - if t

Re: [HACKERS] Cancel race condition

2015-06-11 Thread Robert Haas
On Tue, Jun 9, 2015 at 4:42 AM, Shay Rojansky wrote: > Ah, OK - I wasn't aware that cancellation was actually delivered as a > regular POSIX signal... You're right about the lack of guarantees then. > > In that case, I'm guessing not much could be do to guarantee sane > cancellation behavior... I

Re: [HACKERS] Cancel race condition

2015-06-09 Thread Shay Rojansky
Ah, OK - I wasn't aware that cancellation was actually delivered as a regular POSIX signal... You're right about the lack of guarantees then. In that case, I'm guessing not much could be do to guarantee sane cancellation behavior... I do understand the "best effort" idea around cancellations. Howe

Re: [HACKERS] Cancel race condition

2015-06-08 Thread Tom Lane
Shay Rojansky writes: > My questions/comments: >- Does PostgreSQL *guarantee* that once the connection used to send the >cancellation request is closed by the server, the cancellation has been >delivered (as mentioned by Tom)? In other words, should I be designing a >.NET driver ar

[HACKERS] Cancel race condition

2015-06-08 Thread Shay Rojansky
Hi everyone. I'm working on Npgsql and have run into a race condition when cancelling. The issue is described in the following 10-year-old thread, and I'd like to make sure things are still the same: http://www.postgresql.org/message-id/27126.1126649...@sss.pgh.pa.us My questions/comments: -