Test code for shared memory message queue facility.
Robert Haas <rhaas@postgresql.org>
Test code for shared memory message queue facility. This code is intended as a demonstration of how the dynamic shared memory and dynamic background worker facilities can be used to establish a group of coooperating processes which can coordinate their activities using the shared memory message queue facility. By itself, the code does nothing particularly interesting: it simply allows messages to be passed through a loop of workers and back to the original process. But it's a useful unit test, in addition to its demonstration value.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/Makefile | modified | +1 −0 |
| contrib/test_shm_mq/expected/test_shm_mq.out | added | +18 −0 |
| contrib/test_shm_mq/.gitignore | added | +4 −0 |
| contrib/test_shm_mq/Makefile | added | +20 −0 |
| contrib/test_shm_mq/setup.c | added | +323 −0 |
| contrib/test_shm_mq/sql/test_shm_mq.sql | added | +9 −0 |
| contrib/test_shm_mq/test.c | added | +265 −0 |
| contrib/test_shm_mq/test_shm_mq--1.0.sql | added | +19 −0 |
| contrib/test_shm_mq/test_shm_mq.control | added | +4 −0 |
| contrib/test_shm_mq/test_shm_mq.h | added | +45 −0 |
| contrib/test_shm_mq/worker.c | added | +224 −0 |