shm_mq_sendv: Fix flushing bug when receiver not yet attached.
Robert Haas <rhaas@postgresql.org>
shm_mq_sendv: Fix flushing bug when receiver not yet attached. With the old logic, when the reciever had not yet attached, we would never call shm_mq_inc_bytes_written(), even if force_flush = true was specified. That could result in a situation where data that the sender believes it has sent is never received. Along the way, remove a useless function prototype for a nonexistent function from shm_mq.h. Commit 46846433a03dff4f2e08c8a161e54a842da360d6 introduced these problems. Pavan Deolasee, with a few changes by me. Discussion: https://postgr.es/m/CABOikdPkwtLLCTnzzmpSMXo3QZa2yXq0J7Q61ssdLFAJYrOVvQ@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/ipc/shm_mq.c | modified | +5 −6 |
| src/include/storage/shm_mq.h | modified | +0 −1 |
Discussion
- Shmem queue is not flushed if receiver is not yet attached 6 messages · 2022-03-17 → 2022-05-31