Re: pg_stat_statements cluttered with "DEALLOCATE dbdpg_p*" - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: pg_stat_statements cluttered with "DEALLOCATE dbdpg_p*"
Date
Msg-id alpine.DEB.2.10.1407201710580.16752@sto
Whole thread Raw
In response to Re: pg_stat_statements cluttered with "DEALLOCATE dbdpg_p*"  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
>> That's because PREPARE isn't executed as it's own statement, but done on
>> the protocol level (which will need noticeably fewer messages). There's
>> no builtin logic to ignore actual PREPARE statements.
>
> ISTM that there is indeed a special handling in function 
> pgss_ProcessUtility for PREPARE and EXECUTE:
>
> [...]

For completeness purpose, here is the one-liner patch to handle DEALLOCATE 
as PREPARE & EXECUTE are handled. It is cleaner than the other one, but 
then DEALLOCATE disappear from the table, as PREPARE and EXECUTE do.

-- 
Fabien.

pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: pg_stat_statements cluttered with "DEALLOCATE dbdpg_p*"
Next
From: Andres Freund
Date:
Subject: Re: pg_stat_statements cluttered with "DEALLOCATE dbdpg_p*"