mirror of
https://github.com/postgres/postgres.git
synced 2025-11-25 12:03:53 +03:00
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 46846433a0 introduced these
problems.
Pavan Deolasee, with a few changes by me.
Discussion: https://postgr.es/m/CABOikdPkwtLLCTnzzmpSMXo3QZa2yXq0J7Q61ssdLFAJYrOVvQ@mail.gmail.com
This commit is contained in:
@@ -76,7 +76,6 @@ extern shm_mq_result shm_mq_sendv(shm_mq_handle *mqh, shm_mq_iovec *iov,
|
||||
int iovcnt, bool nowait, bool force_flush);
|
||||
extern shm_mq_result shm_mq_receive(shm_mq_handle *mqh,
|
||||
Size *nbytesp, void **datap, bool nowait);
|
||||
extern void shm_mq_flush(shm_mq_handle *mqh);
|
||||
|
||||
/* Wait for our counterparty to attach to the queue. */
|
||||
extern shm_mq_result shm_mq_wait_for_attach(shm_mq_handle *mqh);
|
||||
|
||||
Reference in New Issue
Block a user