Skip to content

Conversation

@mikhail-marutyan
Copy link

  • proofread README and align headings/subsections with Postgres Pro style
  • add configuration, extension creation, and load-order guidance to Usage
  • provided example query for top wait events collected via pg_wait_sampling + pg_stat_statements

@shinderuk shinderuk self-assigned this Oct 23, 2025
@Medvecrab
Copy link
Contributor

Thanks for your contribution!

But I don't think we will merge it. We quite like our technical-style README (it has some typos and whatnot, but it does its job of explaining how to install and use the extension), and think that this style of writing suits it better than streamlined "not-so-technical-but-more-human" language

There are also some issues with the patch itself

  1. Load order is discussed at the beginning and at the end of the README. The one at the end is simply unnecessary
  2. Provided example of "top queries by wait samples" isn't useful. Sure, you get queries that have a lot of wait events, but you lose what exactly those wait events were.
  3. When compute_query_id is set to auto pg_wait_sampling will not ask the core to compute query_id. So with auto we rely on other extensions (mainly pg_stat_statements) to turn it on. Then, your suggestions contradicts reality - Note (PostgreSQL 14+): if you do not rely on pg_stat_statementsfor query IDs, setcompute_query_id = 'auto'(or'on') so queryid is populated.
  4. Configuration "chapter" is strange. We do not require pg_stat_statements for pg_wait_sampling to work, why add it to shared_preload_libraries? Why do you suggest a history_size of 10000? Why do you change profile_period to 50ms? We have default values for those two parameters, why change them? Also, why is this chapter near the end? If it's meant to be a quick start, then place it at the start. If it's meant to be an extensive explanation (and we already have that as "Configuration parameters" just before), then this chapter is very lacking
  5. Some wording that also bothers me a little:
  • "that order keeps utility statement query id intact" - it isn't quite clear what "intact" means in a sense "what could happen to them"? In old version, we state that query_ids for utility statements are "rewritten", and that's quite clear.
  • "then reload the server configuration for changes" - before we (at least) mentioned pg_reload_conf() function. I think it is useful to mention for people that may not know it exists. And even if everyone does know this, it still doesn't hurt
  • "PostgreSQL reports the current wait event for each backend" - pg_wait_sampling samples all processes, including all background workers and their launchers, not just backends. So you have to use "process" instead of "backend" here

@Medvecrab Medvecrab closed this Nov 11, 2025
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

Successfully merging this pull request may close these issues.

3 participants