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

Support PostgreSQL 17 #373

Open
frost242 opened this issue Sep 11, 2024 · 3 comments
Open

Support PostgreSQL 17 #373

frost242 opened this issue Sep 11, 2024 · 3 comments
Assignees

Comments

@frost242
Copy link
Member

Hello,

I've quickly tested all services, expect replication ones. Without surprise, bgwriter is broken with pg17 as pg_stat_bgwriter has changed :

check_pgactivity -s bgwriter -F human
Service        : CHECK_PGACTIVITY
Returns        : 3 (UNKNOWN)
Message        : Query failed !
psql:/tmp/check_pga-4F250z5u:9: ERREUR:  la colonne « checkpoints_timed » n'existe pas
LINE 1: SELECT checkpoints_timed, checkpoints_req,
@frost242 frost242 self-assigned this Sep 11, 2024
@Krysztophe
Copy link
Collaborator

@frost242 : is it still in your todo list?

@blogh
Copy link
Collaborator

blogh commented Mar 5, 2025

It's a little more complex than I expected, here is a quick recap of what I found.

The patch info :

The query pre v17 :

SELECT checkpoints_timed, checkpoints_req,
       buffers_checkpoint * current_setting('block_size')::numeric,
       buffers_clean * current_setting('block_size')::numeric,
       maxwritten_clean,
       buffers_backend * current_setting('block_size')::numeric,
       buffers_alloc * current_setting('block_size')::numeric,
       buffers_backend_fsync,
       extract ('epoch' from stats_reset)
  FROM pg_stat_bgwriter;

The changes for the query are :

  • pg_stat_bgwriter.checkpoints_timed => pg_stat_checkpointer.num_timed
  • pg_stat_bgwriter.checkpoints_req => pg_stat_checkpointer.num_requested
  • pg_stat_bgwriter.buffers_checkpoint => pg_stat_checkpointer.buffers_written
  • pg_stat_bgwriter.buffers_backend => moved to pg_stat_io
  • pg_stat_bgwriter.buffers_backend_fsync => moved to pg_stat_io & pg_stat_slru
  • pg_stat_bgwriter.stats_reset => the column is also present in pg_stat_checkpointer, pg_stat_io & pg_stat_slru

@frost242
Copy link
Member Author

frost242 commented Mar 5, 2025

@Krysztophe I have to admit that I forgot a bit about it. We still have no pg17 deployed at my work, we're awaiting pg18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants