Re: RFC: Logging plan of the running query

From: Robert Treat <rob(at)xzilla(dot)net>
To: torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, masao(dot)fujii(at)oss(dot)nttdata(dot)com, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: RFC: Logging plan of the running query
Date: 2022-02-03 08:09:07
Message-ID: CABV9wwPHtN6NSo6nrx3REhTpYewU=j9__uroS-B=wTW-1K4yXA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 2, 2022 at 7:59 AM torikoshia <torikoshia(at)oss(dot)nttdata(dot)com> wrote:
>
> 2022-02-01 01:51, Fujii Masao wrote:
<snip>
> > + Note that nested statements (statements executed inside a
> > function) are not
> > + considered for logging. Only the plan of the most deeply nested
> > query is logged.
> >
> > Now the plan of even nested statement can be logged. So this
> > description needs to be updated?
>
> Modified it as below:
>
> - Note that nested statements (statements executed inside a
> function) are not
> - considered for logging. Only the plan of the most deeply nested
> query is logged.
> + Note that when the statements are executed inside a function,
> only the
> + plan of the most deeply nested query is logged.
>

Minor nit, but I think the "the" is superfluous.. ie.

"Note that when statements are executed inside a function,
only the plan of the most deeply nested query is logged"

<snip>
> On 2022-02-01 17:27, Kyotaro Horiguchi wrote:
>
> Thanks for reviewing Horiguchi-san!
>
> > By the way, I'm anxious about the following part and I'd like to
> > remove it.
>
> I also think it would be nice if it's possible.
> >
> > + * Ensure no page lock is held on this process.
> >
> > It seems to me what is wrong is ginInsertCleanup(), not this feature.
>
> > Actually, the discussion is a bit dubious. What we need really to
> check is wheter such locks are not held on an index *elsewhere*.
>
> Since I'm not sure how long it will take to discuss this point, the
> attached patch is based on the current HEAD at this time.
> I also think it may be better to discuss it on another thread.
>

While I agree on the above points, IMHO I don't believe it should be a
show-stopper for adding this functionality to v15, but we have a few
more commitments before we get to that point.

Robert Treat
https://xzilla.net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2022-02-03 08:14:07 Re: do only critical work during single-user vacuum?
Previous Message Ken Kato 2022-02-03 07:45:17 [PATCH] Add min() and max() aggregate functions for xid8