Re: pg_stat_statements cluttered with "DEALLOCATE dbdpg_p*"

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_stat_statements cluttered with "DEALLOCATE dbdpg_p*"
Date: 2014-07-20 18:13:33
Message-ID: alpine.DEB.2.10.1407202002280.16752@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>>> If you do not like my normalization hack (I do not like it much either:-), I
>>> have suggested to add "&& !IsA(parsetree, DeallocateStmt)" to the condition
>>> above, which would ignore DEALLOCATE as PREPARE and EXECUTE are currently
>>> and rightfully ignored.
>
>> Well, EXECUTE isn't actually ignored, but tracked via the execution
>> time. But that doesn't diminish your point with PREPARE. If we do
>> something we should go for the && !IsA(parsetree, DeallocateStmt), not
>> the normalization. The latter is pretty darn bogus.
>
> Agreed. I think basically the reasoning here is "since we don't track
> PREPARE or EXECUTE, we shouldn't track DEALLOCATE either".

Yes. It is not just because it is nicely symmetric, it is also annoying to
have hundreds of useless DEALLOCATE stats in the table.

> However, this is certainly a behavioral change. Perhaps squeeze it
> into 9.4,

That would be nice, and the one-liner looks safe enough.

> but not the back braches?

Yep. I doubt that pg_stat_statements users rely on statistics about
DEALLOCATE, so back patching the would be quite safe as well, but I would
not advocate it.

--
Fabien.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-07-20 20:51:09 Re: pg_stat_statements cluttered with "DEALLOCATE dbdpg_p*"
Previous Message Tom Lane 2014-07-20 17:56:02 Re: pg_stat_statements cluttered with "DEALLOCATE dbdpg_p*"