Re: Sample values for pg_stat_statements - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Sample values for pg_stat_statements
Date
Msg-id 20180301182615.wh7kqgqmuwzsimf4@alap3.anarazel.de
Whole thread Raw
In response to Sample values for pg_stat_statements  (Vik Fearing <vik.fearing@2ndquadrant.com>)
Responses Re: Sample values for pg_stat_statements  (Vik Fearing <vik.fearing@2ndquadrant.com>)
List pgsql-hackers
Hi,

On 2017-12-31 12:34:17 +0100, Vik Fearing wrote:
> Often when looking through pg_stat_statements, it would be nice to have
> some sample values for the constants and parameters.  This patch
> implements that by taking the values from the first execution of the
> normalized query.
> 
> To keep things reasonable, there is a limit on how big the parameters
> can be.

Hm. Isn't this going to blow up the size of the file in cases with a
number of parameters quite considerably, a file limit notwithstanding?
Wonder if the size limit wouldn't have to be across all params.

I'm also pretty sure that not everyone will be happy, for privacy / data
minimalism reasons, that some bind parameters are suddenly preserved?
That could very well include passwords and whatnot!  I don't think we
can have the same view as done already show these, without causing
issues for users that do want to grant wider access to pgss, but not
show bind parameters for everyone.

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pgbench - test whether a variable exists
Next
From: Tom Lane
Date:
Subject: Re: postgres_fdw: perform UPDATE/DELETE .. RETURNING on a join directly