Re: [WIP] Patches to enable extraction state of query execution from external session

From: Andres Freund <andres(at)anarazel(dot)de>
To: Maksim Milyutin <m(dot)milyutin(at)postgrespro(dot)ru>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [WIP] Patches to enable extraction state of query execution from external session
Date: 2016-08-30 17:36:27
Message-ID: 20160830173627.gezzxy27gwwr4f2a@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2016-08-30 11:22:43 +0300, Maksim Milyutin wrote:
> > Hi,
> >
> > On 2016-08-29 18:22:56 +0300, maksim wrote:
> > > Now I complete extension that provides facility to see the current state of
> > > query execution working on external session in form of EXPLAIN ANALYZE
> > > output. This extension works on 9.5 version, for 9.6 and later it doesn't
> > > support detailed statistics for parallel nodes yet.
> >
> > Could you expand a bit on what you want this for exactly?
>
> Max goal - to push my extension to postgres core. But now it's ready only
> for 9.5. Prerequisites of this extension are patches presented here.

I'm asking what you want this for. "An extension" isn't a detailed
description...

> > > 2. Patch that enables to interrupt the query executor
> > > (executor_hooks.patch).
> > > This patch enables to hang up hooks on executor function of each node
> > > (ExecProcNode). I define hooks before any node execution and after
> > > execution.
> > > I use this patch to add possibility of query tracing by emitted rows from
> > > any node. I interrupt query executor after any node delivers one or zero
> > > rows to upper node. And after execution of specific number trace steps I can
> > > get the query state of traceable backend which will be somewhat
> > > deterministic. I use this possibility for regression tests of my extension.
> >
> > This will increase executor overhead.
>
> In simple case we have checks on existence of hooks.

That *is* noticeable.

> > I think we'll need to find a way
> > to hide this behind the existing if (instrument) branches.
>
> And so can be. It doesn't matter for trace mode. But I think instrument
> branch is intended only for collecting statistics by nodes.

I can't follow here. That's all what analyze is about?

Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2016-08-30 17:44:39 Re: Pinning a buffer in TupleTableSlot is unnecessary
Previous Message Heikki Linnakangas 2016-08-30 17:36:22 Re: Pinning a buffer in TupleTableSlot is unnecessary