From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | "imai(dot)yoshikazu(at)fujitsu(dot)com" <imai(dot)yoshikazu(at)fujitsu(dot)com> |
Cc: | legrand legrand <legrand_legrand(at)hotmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Planning counters in pg_stat_statements (using pgss_store) |
Date: | 2020-03-16 21:49:12 |
Message-ID: | 20200316214912.iakenhp7vyd37hmg@nol |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Mar 16, 2020 at 01:34:11AM +0000, imai(dot)yoshikazu(at)fujitsu(dot)com wrote:
> On Sat, Mar 14, 2020 at 5:28 PM, Julien Rouhaud wrote:
> > I don't think that's a correct assumption. I obviously didn't read all of
> > citus extension, but it looks like what's happening is that they get generate a
> > custom Query from the original one, with all the modification needed for
> > distributed execution and whatnot, which is then fed to the planner. I think
> > it's entirely mossible that the modified Query herits from a previously set
> > queryid, while still not really having a query text. And if citus doesn't do
> > that, it doesn't seem like an illegal use cuse anyway.
>
> Indeed. It can happen that queryid has some value while query_text is NULL.
>
>
> > I'm instead attaching a v7 which removes the assert in pg_plan_query, and
> > modify pgss_planner_hook to also ignore queries without a query text, as this
> > seems the best option.
>
> Thank you.
> It also seems to me that is the best option.
Thanks Imai-san and PAscal for the feedback, it seems that we have an
agreement!
> BTW, I recheck the patchset.
> I think codes are ready for committer but should we modify the documentation?
> {min,max,mean,stddev}_time is now obsoleted so it is better to modify it to
> {min,max,mean,stddev}_exec_time and add {min,max,mean,stddev}_plan_time.
Oh indeed, I totally forgot about this. I'm attaching v8 with updated
documentation that should match what was implemented since some versions.
Attachment | Content-Type | Size |
---|---|---|
v8-0001-Pass-query-string-to-the-planner.patch | text/x-diff | 10.4 KB |
v8-0002-Add-planning-counters-to-pg_stat_statements.patch | text/x-diff | 46.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | ankurthakkar | 2020-03-16 21:51:13 | How to install https://github.com/sraoss/pgsql-ivm on postgress |
Previous Message | Justin Pryzby | 2020-03-16 21:48:06 | Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*) |