Re: Sample values for pg_stat_statements

From: Andres Freund <andres(at)anarazel(dot)de>
To: Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Sample values for pg_stat_statements
Date: 2018-03-01 18:26:15
Message-ID: 20180301182615.wh7kqgqmuwzsimf4@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-03-01 18:34:18 Re: postgres_fdw: perform UPDATE/DELETE .. RETURNING on a join directly
Previous Message Alvaro Herrera 2018-03-01 18:25:24 Re: pgbench - test whether a variable exists