Re: On-demand running query plans using auto_explain and signals - Mailing list pgsql-hackers

From Shulgin, Oleksandr
Subject Re: On-demand running query plans using auto_explain and signals
Date
Msg-id CACACo5RowbRffGTn=JazPmBkMkmDoCwH7EJgO9F1gCCLPEW3eg@mail.gmail.com
Whole thread Raw
In response to Re: On-demand running query plans using auto_explain and signals  ("Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>)
Responses Re: On-demand running query plans using auto_explain and signals  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
On Wed, Sep 9, 2015 at 10:22 AM, Shulgin, Oleksandr <oleksandr.shulgin@zalando.de> wrote:
On Wed, Sep 9, 2015 at 8:36 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote:

Please find attached v4.

It is better

One important thing to notice, and probably deserves a code comment, that any modification of the slot fields done by the info sender backend must be done before actually sending the message via the shared memory queue (or detaching one, if there's nothing to be sent).  Otherwise it is possible that is_processed flag will be set on the slot that has been already reused by the receiving backend.

Sorry, the latest version did contain some debugging messages I didn't intend to send.  I've removed them and also added a comment about the above synchronization problem.

--
Alex

Attachment

pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: checkpointer continuous flushing
Next
From: Etsuro Fujita
Date:
Subject: Re: Minor code improvements to create_foreignscan_plan/ExecInitForeignScan