RE: Planning counters in pg_stat_statements (using pgss_store)

From: "imai(dot)yoshikazu(at)fujitsu(dot)com" <imai(dot)yoshikazu(at)fujitsu(dot)com>
To: 'Julien Rouhaud' <rjuju123(at)gmail(dot)com>
Cc: legrand legrand <legrand_legrand(at)hotmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "marco(at)citusdata(dot)com" <marco(at)citusdata(dot)com>
Subject: RE: Planning counters in pg_stat_statements (using pgss_store)
Date: 2020-03-13 06:35:48
Message-ID: OSAPR01MB46092D33511B69D959E1C76494FA0@OSAPR01MB4609.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 12, 2020 at 10:31 AM, Julien Rouhaud wrote:
> > * bufusage still only counts the buffer usage during executor.
> >
> > Now we have the ability to count the buffer usage during planner but we
> keep
> > the bufusage count the buffer usage during executor for now.
>
> The bufusage should reflect the sum of planning and execution usage if
> track_planning is enabled. Did I miss something there?

Ah, you're right. I somehow misunderstood it. Sorry for the annoying.

> > * We add Assert in pg_plan_query so that query_text will not be NULL
> > when executing planner.
> >
> > There's no case query_text will be NULL with current sources. It is not
> > ensured there will be any case query_text will be possibly NULL in the
> > future though. Some considerations are needed by other people about
> this.
>
> There's at least the current version of IVM patchset that lacks the querytext.

I saw IVM patchset but I thought it is difficult to impose them to give appropriate
querytext.

> Looking at various extensions, I see that pg_background and pglogical call
> pg_plan_query internally but shouldn't have any issue providing the query text.
> But there's also citus extension, which don't keep around the query string at
> least when distributing plans, which makes sense since it's of no use and
> they're heavily modifying the original Query. I think that citus folks opinion on
> the subject would be useful, so I'm Cc-ing Marco.

Thank you for looking those codes. I will comment about this in another mail.

--
Yoshikazu Imai

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2020-03-13 06:39:43 Re: logical replication empty transactions
Previous Message Michael Paquier 2020-03-13 06:12:34 Re: Refactor compile-time assertion checks for C/C++