Re: Buffer usage in EXPLAIN and pg_stat_statements (review)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Buffer usage in EXPLAIN and pg_stat_statements (review)
Date: 2009-10-15 00:46:39
Message-ID: 603c8f070910141746j781a79dfx93462ae2f155c50b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 14, 2009 at 9:56 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> writes:
>> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> 2. I do not understand the stuff with propagating counts into the top
>>> instrumentation node.
>
>> It is required by contrib/pg_stat_statements. EXPLAIN wants per-node
>> accumulation, but pg_stat_statements wants the total number.
>
> Well, you need to find another way or risk getting the patch rejected
> altogether.  Those global variables are the weakest part of the whole
> design, and I'm not going to commit a patch that destabilizes the entire
> system for the sake of a debatable "requirement" of a contrib module.
>
> If you went with the alternative definition I suggested (don't reset the
> static counters, so that every node includes its children's counts) then
> the behavior you want would fall out automatically.  Or, at the price of
> running both resettable and non-resettable static counters, you could
> have pg_stat_statements obtain totals that are independent of any
> particular instrumentation node.

I am marking this patch as Returned with Feedback. I hope that it
will be resubmitted for a future CommitFest, because I think this
could be pretty interesting feature.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message KaiGai Kohei 2009-10-15 00:54:06 Re: [PATCH] Largeobject access controls
Previous Message Robert Haas 2009-10-15 00:43:21 Re: [PATCH] Largeobject access controls