percona / pg_stat_monitor

Query Performance Monitoring Tool for PostgreSQL
https://docs.percona.com/pg-stat-monitor/
Other
466 stars 59 forks source link

[PG-810] PG-17 Support #463

Closed artemgavrilov closed 1 month ago

artemgavrilov commented 4 months ago

PG-810

Full PG17 diff: https://github.com/postgres/postgres/compare/REL_16_STABLE...REL_17_BETA2 Docs about pg_stat_statements fields: https://www.postgresql.org/docs/17/pgstatstatements.html

Addressed changes:

  1. Rename of blk_read_time and blk_write_time to shared_blk_read_time and shared_blk_write_time https://github.com/postgres/postgres/commit/13d00729d422c84b1764c24251abcc785ea4adb1
  2. Add local_blk_read_time and local_blk_write_time https://github.com/postgres/postgres/commit/5147ab1dd34ad81c169c85fa3c7d11a782a1555b
  3. Remove "deadcode" macros https://github.com/postgres/postgres/commit/75680c3d805e2323cd437ac567f0677fdfc7b680
  4. Add jit_deform_time and jit_deform_count https://github.com/postgres/postgres/commit/5a3423ad8ee171fbf08317917981effe47d211eb
  5. Add statement entry timestamps stats_since and minmax_stats_since https://github.com/postgres/postgres/commit/dc9f8a798307244d791b71f666f50de319799e7c https://www.postgresql.org/message-id/flat/72e80e7b160a6eb189df9ef6f068cce3765d37f8.camel%40moonset.ru
  6. Fix nesting level tracking issues (not back-ported because changes behavior) https://github.com/postgres/postgres/commit/76db9cb6368eb553ec334fe05e1258f2439bf07f

Added code was formatted with pgindent

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 81.01266% with 15 lines in your changes missing coverage. Please review.

Project coverage is 84.82%. Comparing base (c796995) to head (bc90dca).

Files Patch % Lines
pg_stat_monitor.c 80.51% 3 Missing and 12 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #463 +/- ## ========================================== + Coverage 84.56% 84.82% +0.26% ========================================== Files 3 3 Lines 1270 1292 +22 Branches 196 196 ========================================== + Hits 1074 1096 +22 - Misses 98 99 +1 + Partials 98 97 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

artemgavrilov commented 3 months ago

@codeforall Please check last commit. It restores/fixed previous behavior for PG less than 17 because nesting level fix should not be back-ported (similar to pg_stat_statements). level_tracking_1.out result matches to level_tracking test output on main branch.