Re: New function pg_stat_statements_reset_query() to resetstatistics of a specific query
От | Alvaro Herrera |
---|---|
Тема | Re: New function pg_stat_statements_reset_query() to resetstatistics of a specific query |
Дата | |
Msg-id | 20181128134335.fgrhuhw66ggwzusa@alvherre.pgsql обсуждение исходный текст |
Ответ на | Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query (Amit Kapila <amit.kapila16@gmail.com>) |
Ответы |
Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query
Re: New function pg_stat_statements_reset_query() to resetstatistics of a specific query Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query |
Список | pgsql-hackers |
On 2018-Nov-28, Amit Kapila wrote: > The problem with this idea is that if someone specifies a particular > parameter using query and the query doesn't return any parameters, > then it can lead to inadvertent behavior. For example, if user uses > something like pg_stat_statements_reset(<valid_user_id>, > <valid_db_id>, SELECT s.queryid FROM pg_stat_statements AS s WHERE > s.query = 'SELECT $1 AS "ONE"'); now, if the query doesn't return any > row, we will remove the stats for all queries that belong to > (userid,dbid). It could be surprising for some users, that's why we > came up with option-4 where we keep the default value of parameters as > 0. Right, I think option 4 is a clear improvement over option 1. I can get behind that one. Since not many people care to vote, I think this tips the scales enough to that side. Thanks for your patience. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: