From: | "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, 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-28 14:24:33 |
Message-ID: | CACACo5R6G=iUEE3zcCK43RagmwXxy7PAhHU_9nW3ZvC2_jsDfg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Sep 25, 2015 at 7:13 PM, Shulgin, Oleksandr <
oleksandr(dot)shulgin(at)zalando(dot)de> wrote:
>
> Some implementation details:
>
> For every backend that might be running (MaxBackends) we reserve a
> dsm_handle slot in the addins shared memory. When the new option is turned
> on, the ExecutorRun hook will produce a plan in whatever format is
> specified by the auto_explain.log_format, allocate a DSM segment, copy the
> plan into the segment and finally store the DSM handle into its own slot.
> No locking is required around this because every backend writes to its slot
> exclusively, no other backend can be writing into it concurrently. In the
> ExecutorFinish hook we invalidate the backend's slot by setting the handle
> to 0 and deallocate the DSM segment.
>
And this patch adds back the use of table of contents on the DSM.
Benefits: magic number validation; communication of the actual plan size.
--
Alex
Attachment | Content-Type | Size |
---|---|---|
0002-Add-SHM-table-of-contents-to-the-explain-DSM.patch | text/x-patch | 3.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Marti Raudsepp | 2015-09-28 14:28:19 | Re: BRIN indexes for MAX, MIN, ORDER BY? |
Previous Message | Tom Lane | 2015-09-28 14:20:58 | Re: Doubt in pgbench TPS number |