[HACKERS] pg_stat_statements: Query normalisation may fail during stats reset

2014-05-06 Thread Michael Renner
Hi, when regularly collecting resetting query information from pg_stat_statements it’s possible to trigger a situation where unnormalised queries are stored. I think what happens is the following: pgss_post_parse_analyse calls pgss_store with a non-null jstate which will cause the query

Re: [HACKERS] pg_stat_statements: Query normalisation may fail during stats reset

2014-05-06 Thread Robert Haas
On Tue, May 6, 2014 at 12:26 PM, Michael Renner michael.ren...@amd.co.at wrote: when regularly collecting resetting query information from pg_stat_statements it’s possible to trigger a situation where unnormalised queries are stored. I think what happens is the following:

Re: [HACKERS] pg_stat_statements: Query normalisation may fail during stats reset

2014-05-06 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, May 6, 2014 at 12:26 PM, Michael Renner when regularly collecting resetting query information from pg_stat_statements it’s possible to trigger a situation where unnormalised queries are stored. Is this something that should be fixed or is

Re: [HACKERS] pg_stat_statements: Query normalisation may fail during stats reset

2014-05-06 Thread Peter Geoghegan
On Tue, May 6, 2014 at 11:31 AM, Tom Lane t...@sss.pgh.pa.us wrote: The source code says that query strings are normalized on a best effort basis, so perhaps we ought to say the same in the documentation. Perhaps. It would be rather expensive to provide a guarantee of normalization: