Diego Fronza
775c087fb2
PG-222: Add benchmark support for measuring hook execution time.
...
Added a new view 'pg_stat_monitor_hook_stats' that provide execution
time statistics for all hooks installed by the module, following is a
description of the fields:
- hook: The hook function name.
- min_time: The fastest execution time recorded for the given hook.
- max_time: The slowest execution time recorded for the given hook.
- total_time: Total execution time taken by all calls to the hook.
- avg_time: Average execution time of a call to the hook.
- ncalls: Total number of calls to the hook.
- load_comparison: A percentual of time taken by an individual hook
compared to every other hook.
To enable benchmark, code must be compiled with -DBENCHMARK flag, this
will make the hook functions to be replaced by a function with the same
name plus a '_benchmark' suffix, e.g. hook_function_benchmark.
The hook_function_benchmark will call the original function and
calculate the amount of time it took to execute, than it will update
statistics for that hook.
2021-08-23 11:50:56 -04:00
Diego Fronza
99f01d37e3
PG-200: Add application name to the bucket ID.
...
Add application name to the key used to identify queries in the hash
table, this allows different applications to have separate entries in
pg_stat_monitor view if they issued the same query.
2021-07-29 15:05:08 -04:00
Ibrar Ahmed
6c2e052396
PG-194: PostgreSQL 13.3 and 14 support.
2021-07-27 13:37:13 +00:00
Ibrar Ahmed
1dcf596194
Merge branch 'master' of https://github.com/percona/pg_stat_monitor
2021-07-27 12:58:22 +00:00
Ibrar Ahmed
815e543bfe
PG-194: PostgreSQL 13.3 and 14 support.
2021-07-27 12:57:29 +00:00
Diego Fronza
a3a4c99011
PG-197: Fix conflict with pg_stat_statements.
...
If pg_stat_monitor is loaded after pg_stat_statement, then it will end
up calling standard_planner function twice in the pgss_planner_hook()
function, this will trigger an assertion failure from PostgreSQL as this
function expects an untouched Query* object, and the first call to
standard_planner() done by pg_stat_statements modifies the object.
To address the problem, we avoid calling standard_planner function twice
in pg_stat_monitor, if a previous handler is installed for the hook
planner_hook, then we assume that this previous hook has already called
standard_planner function and don't do it again.
2021-07-26 10:16:29 -04:00
Ibrar Ahmed
f470ba591a
PG-194: PostgreSQL-14 support added.
2021-05-21 21:29:58 +05:00
Ibrar Ahmed
67b3d961ca
PG-193: Comment based tags to identify different parameters.
2021-05-19 22:15:37 +05:00
Ibrar Ahmed
89614e442b
PG-190: Does not show query, if query elapsed time is greater than bucket time.
2021-04-08 15:29:42 +05:00
Ibrar Ahmed
f42893472a
PG-189: Regression crash in case of PostgreSQL 11.
...
The size of string required to contain the queryid is smaller which
produce the crash.
2021-03-21 00:39:29 +05:00
Ibrar Ahmed
f8ed33a92a
PG-188: Added a new column to monitor the query state.
2021-03-21 00:04:39 +05:00
Ibrar Ahmed
96a7603aae
PG-187: Compilation Error for PostgreSQL 11 and PostgreSQL 12.
2021-03-17 20:42:58 +05:00
Ibrar Ahmed
e0fc683810
PG-186: Add support to monitor query execution plan.
2021-03-17 18:56:39 +05:00
Ibrar Ahmed
066162c3f6
PG-186: Add support to monitor query execution plan.
...
This requires refactoring of code to add this functionality. Along with
that this patch contains regression test cases.
2021-03-12 18:55:12 +00:00
Ibrar Ahmed
6aa1b2e7b6
PG-182: Added a new option for the query buffer overflow.
2021-02-17 13:08:39 +00:00
Ibrar Ahmed
0c9c25fbd9
PG-181: Segmentation fault in case of track_utility is ON.
2021-02-16 16:46:32 +00:00
Ibrar Ahmed
b115d748a8
PG-179. Skip lines for checking, and badge to README.
...
Patch By: Mikhail Samoylov
2021-02-16 12:46:53 +00:00
Ibrar Ahmed
963e509c65
PG-180: Relations column is not showing all the relations in case of PostgreSQL Version 11.
2021-02-16 12:35:33 +00:00
Ibrar Ahmed
a27a3798aa
PG-178: CI with github for PostgreSQL-11 and 12.
2021-02-15 17:23:44 +00:00
Ibrar Ahmed
e69465636d
PG-180: Relations column is not showing all the relations in case of PostgreSQL Version 11.
2021-02-15 14:26:45 +00:00
Ibrar Ahmed
d3278c0e4c
PG-178: Test cases fixes.
2021-02-15 12:29:03 +00:00
Ibrar Ahmed
ed6fe2d8dc
PG-147 Stored Procedure Support add parentid to track caller.
...
Patch By: Martin Sun
Reviewed By: Hamid Akhtar
2021-02-12 11:42:36 +00:00
Ibrar Ahmed
cba6bbfbd4
PG-177: Error in Histogram ranges.
2021-02-11 19:07:39 +00:00
Ibrar Ahmed
d60f725b4a
PG-176 : Extract fully qualified relations name.
2021-02-11 15:51:44 +00:00
Ibrar Ahmed
ce9d503cdb
PG-175: Only Superuser / Privileged user can view IP address.
2021-02-11 12:41:21 +00:00
Ibrar Ahmed
a6036b86ac
PG-174: Code cleanup.
2021-02-11 12:02:04 +00:00
Ibrar Ahmed
bd8c54476f
PG-150: Logging CMD Type like SELECT, UPDATE, INSERT, DELETE.
2021-02-10 14:55:40 +00:00
Ibrar Ahmed
fb819a5b23
PG-173: Added new WAL usage statistics.
2021-02-02 17:52:41 +00:00
Ibrar Ahmed
8410572ce3
PG-173: Added new WAL usage statistics.
2021-02-02 15:50:33 +00:00
Ibrar Ahmed
12ba1e39d1
PG-172: Exponential histogram for time buckets.
2021-02-02 15:30:28 +00:00
Ibrar Ahmed
8fea207cbf
PG-169: Use macros to avoid the potential buffer over run.
2021-01-22 17:34:05 +00:00
Hamid Akhtar
7f84b8d08e
PG-169: Fixing message buffer overrun and incorrect index access to fix the server crash.
...
Crash was occurring during server regression.
Reviewed By: Ibrar Ahmad.
2021-01-20 20:15:00 +05:00
Ibrar Ahmed
401e2b0505
PG-168: "calls" and histogram parameter does not match.
2021-01-19 13:05:54 +00:00
Ibrar Ahmed
10e0b4f0f6
PG-167: SQLERRCODE must be in readable format.
2021-01-19 12:35:52 +00:00
Ibrar Ahmed
412d9bc9b1
PG-166: Display actual system time instead of null.
2021-01-18 17:11:49 +00:00
Ibrar Ahmed
0e8f4c489c
PG-165: Recycle expired buckets.
2021-01-14 12:58:42 +00:00
Ibrar Ahmed
722435ec98
PG-161: Miscellaneous small issues.
2021-01-12 15:51:34 +00:00
Ibrar Ahmed
a297ac19ea
PG-161: Miscellaneous small issues.
2021-01-12 07:47:22 +00:00
Ibrar Ahmed
84de947da6
PG-160: Integration with PGXN.
2021-01-11 17:57:27 +00:00
Ibrar Ahmed
860de28e6f
PG-159: Bucket start time (bucket_start_time) should be aligned with bucket_time.
2021-01-11 17:20:27 +00:00
Ibrar Ahmed
44bab626f1
PG-158: Segmentation fault while using pgbench with clients > 1.
2021-01-08 18:12:04 +00:00
Ibrar Ahmed
9bee6b3690
Copyright Notice update.
2021-01-05 18:56:07 +00:00
Ibrar Ahmed
aeeaeaeb46
Revert "PG-156: Adding a placeholder replacement function for prepared statement"
...
This reverts commit 1e67e0b5bd
. The commit breaks some
functionality.
2021-01-05 18:51:00 +00:00
Martin Sun
1e67e0b5bd
PG-156: Adding a placeholder replacement function for prepared statement
...
When users set normalized_query to off and execute a prepared statement
user can see the actual value of parameters.
Reviewd By: Hamid Akhtar
2021-01-04 21:02:35 +08:00
Ibrar Ahmed
a2e1f89dea
Bumped version number to 0.7.0
2020-12-28 14:03:16 +00:00
Ibrar Ahmed
47ad105011
PG-150: Logging CMD Type like SELECT, UPDATE, INSERT, DELETE.
2020-12-06 16:38:48 +00:00
Ibrar Ahmed
bedc2ffc78
PG-154: Add backup option in case of no space left in the bucket.
2020-11-29 20:11:23 +00:00
Ibrar Ahmed
6ec5c2b4ed
PG-153: Log application name.
2020-11-24 21:03:32 +00:00
Ibrar Ahmed
057150c99b
Issue - ( #21 ): Show objects(tables) involved in the query.
...
PG-96
2020-11-24 20:10:49 +00:00
Ibrar Ahmed
971e57fd93
Issue - ( #62 ): Logging CMD Type like SELECT, UPDATE, INSERT and DELETE.
...
PG-150
2020-11-24 18:02:25 +00:00