Re: Planning counters in pg_stat_statements (using pgss_store)
От | Julien Rouhaud |
---|---|
Тема | Re: Planning counters in pg_stat_statements (using pgss_store) |
Дата | |
Msg-id | 20200316214912.iakenhp7vyd37hmg@nol обсуждение исходный текст |
Ответ на | RE: Planning counters in pg_stat_statements (using pgss_store) ("imai.yoshikazu@fujitsu.com" <imai.yoshikazu@fujitsu.com>) |
Ответы |
RE: Planning counters in pg_stat_statements (using pgss_store)
Re: Planning counters in pg_stat_statements (using pgss_store) |
Список | pgsql-hackers |
On Mon, Mar 16, 2020 at 01:34:11AM +0000, imai.yoshikazu@fujitsu.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.
Вложения
В списке pgsql-hackers по дате отправления: