On Fri, Sep 18, 2015 at 6:59 AM, Pavel Stehule <pavel.steh...@gmail.com> wrote: > I am afraid so it has not simple and nice solution - when data sender will > wait for to moment when data are received, then we have same complexity like > we use shm_mq. > > Isn't better to introduce new background worker with responsibility to clean > orphaned DSM?
That won't work, or at least not easily. On Windows, the DSM is cleaned up by the operating system as soon as nobody has it mapped. Frankly, I think you guys are making this out to be way more complicated than it really is. Basically, I think the process being queried should publish a DSM via a slot it owns. The recipient is responsible for reading it and then notifying the sender. If a second process requests data before the first process reads its data, the second process can either (1) become an additional reader of the already-published data or (2) wait for the first process to finish, and then send its own inquiry. There are some problems to solve here, but they hardly seem impossible. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers