forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit44339b8
committed
shm_mq: After a send fails with SHM_MQ_DETACHED, later ones should too.
Prior to this patch, it was occasionally possible, after shm_mq_sendvhad previously returned SHM_MQ_DETACHED, for a later shm_mq_sendvoperation to fail an assertion instead of just again returningSHM_MQ_ATTACHED. From the shm_mq code's point of view, it wasexpecting to be called again with the same arguments, since theprevious operation had only partially completed. However, a callerwho isn't using non-blocking mode won't be prepared to repeat the callwith the same arguments, and this code shouldn't expect that theywill. Repair in such a way that we'll be OK whether the next calluses the same arguments or not.Found by Andreas Seltenreich. Analysis and sketch of fix by AmitKapila. Patch by me, reviewed by Amit Kapila.1 parente191a69 commit44339b8
1 file changed
+30
-2
lines changedLines changed: 30 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
366 | 366 |
| |
367 | 367 |
| |
368 | 368 |
| |
369 |
| - | |
370 |
| - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
371 | 375 |
| |
| 376 | + | |
| 377 | + | |
372 | 378 |
| |
373 | 379 |
| |
374 | 380 |
| |
| |||
378 | 384 |
| |
379 | 385 |
| |
380 | 386 |
| |
| 387 | + | |
| 388 | + | |
| 389 | + | |
381 | 390 |
| |
382 | 391 |
| |
383 | 392 |
| |
| |||
432 | 441 |
| |
433 | 442 |
| |
434 | 443 |
| |
| 444 | + | |
435 | 445 |
| |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
436 | 455 |
| |
437 | 456 |
| |
438 | 457 |
| |
| |||
449 | 468 |
| |
450 | 469 |
| |
451 | 470 |
| |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
452 | 480 |
| |
453 | 481 |
| |
454 | 482 |
| |
|
0 commit comments
Comments
(0)