Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PG-17 Support #463

Open
wants to merge 47 commits into
base: main
Choose a base branch
from
Open

PG-17 Support #463

wants to merge 47 commits into from

Conversation

artemgavrilov
Copy link
Contributor

@artemgavrilov artemgavrilov commented May 7, 2024

Resolves #454

Full PG17 diff: postgres/postgres@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
    postgres/postgres@13d0072
  2. Add local_blk_read_time and local_blk_write_time
    postgres/postgres@5147ab1
  3. Remove "deadcode" macros
    postgres/postgres@75680c3
  4. Add jit_deform_time and jit_deform_count
    postgres/postgres@5a3423a
  5. Add statement entry timestamps stats_since and minmax_stats_since
    postgres/postgres@dc9f8a7
    https://www.postgresql.org/message-id/flat/72e80e7b160a6eb189df9ef6f068cce3765d37f8.camel%40moonset.ru
  6. Fix nesting level tracking issues (not back-ported because changes behavior)
    postgres/postgres@76db9cb

Added code was formatted with pgindent

Copy link

codecov bot commented Jun 5, 2024

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 ⚠️
Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@artemgavrilov artemgavrilov marked this pull request as ready for review June 6, 2024 15:09
@ImTheKai ImTheKai added the enhancement New feature or request label Jun 6, 2024
Copy link
Contributor

@codeforall codeforall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@artemgavrilov
Copy link
Contributor Author

@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.

Copy link
Contributor

@Naeem-Akhter Naeem-Akhter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@artemgavrilov artemgavrilov self-assigned this Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make pg_stat_monitor ready for PostgreSQL 17
4 participants