From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: On-demand running query plans using auto_explain and signals |
Date: | 2015-09-18 17:04:50 |
Message-ID: | CA+TgmoYax0YVp5RGpAStyfHanNbRcTWXrOzci34+dbpJTvkCvw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Sep 18, 2015 at 6:59 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-09-18 17:06:53 | Re: numbering plan nodes |
Previous Message | Robert Haas | 2015-09-18 16:56:49 | Re: Parallel Seq Scan |