pg_stat_statements shows too short COMMIT time
| От | MauMau |
|---|---|
| Тема | pg_stat_statements shows too short COMMIT time |
| Дата | |
| Msg-id | 84342E669CE749A29FC9E80D774EF8FD@maumau обсуждение исходный текст |
| Список | pgsql-hackers |
Hello, I've found a problem with pg_stat_statements while doing some performance test. If the fix is desired and not difficult, I'm willing to address it. Could you give me any information and/or your opinions? [Problem] The time of COMMIT statements is unreasonably short. pg_stat_statements' result shows that the average COMMIT time is 2 us (calls=200, total_time=0.4 ms). It doesn't include most of the commit processing, including WAL flush. [Cause] pg_stat_statements measures the time taken in ProcessUtility(). However, ProcessUtility() only updates some transaction state variables. The actual COMMIT processing, CommitTransactionCommand(), is called from finish_xact_command() in postgres.c. This is not measured. [Question] Is this an expected behavior to be kept as now? If no, can this be fixed easily (and how)? Is the actual commit processing out of the scope of pg_stat_statements? Regards MauMau
В списке pgsql-hackers по дате отправления: