postgresql/src/backend/storage/ipc
Robert Haas 7bb0e97407 Extend shm_mq API with new functions shm_mq_sendv, shm_mq_set_handle.
shm_mq_sendv sends a message to the queue assembled from multiple
locations.  This is expected to be used by forthcoming patches to
allow frontend/backend protocol messages to be sent via shm_mq, but
might be useful for other purposes as well.

shm_mq_set_handle associates a BackgroundWorkerHandle with an
already-existing shm_mq_handle.  This solves a timing problem when
creating a shm_mq to communicate with a newly-launched background
worker: if you attach to the queue first, and the background worker
fails to start, you might block forever trying to do I/O on the queue;
but if you start the background worker first, but then die before
attaching to the queue, the background worrker might block forever
trying to do I/O on the queue.  This lets you attach before starting
the worker (so that the worker is protected) and then associate the
BackgroundWorkerHandle later (so that you are also protected).

Patch by me, reviewed by Stephen Frost.
2014-10-08 14:38:31 -04:00
..
Makefile Single-reader, single-writer, lightweight shared message queue. 2014-01-14 12:23:22 -05:00
dsm.c Fix logic bug in dsm_attach(). 2014-05-06 13:40:34 -04:00
dsm_impl.c Assorted message fixes and improvements 2014-09-05 01:25:27 -04:00
ipc.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
ipci.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
pmsignal.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
procarray.c Fix misc typos in comments. 2014-05-23 08:16:21 -04:00
procsignal.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
shm_mq.c Extend shm_mq API with new functions shm_mq_sendv, shm_mq_set_handle. 2014-10-08 14:38:31 -04:00
shm_toc.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
shmem.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
shmqueue.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
sinval.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
sinvaladt.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
standby.c Fix typos in comments. 2014-05-21 23:19:01 -04:00