Also, I think this is now the third independent request to expose
query ID in pg_stat_statements. I think we should give the people
what they want.
Count me as the 4th.
This would be a very important feature for automated query analysis.
pg_stat_statements lacks query examples, and the only way to get them is from the logs.
Where we don't have queryid as well. So people end up either doing it manually or writing
yet another set of nasty regular expressions.
Routing query analysis s a crucial for any large project. If there are chances to implement
queryid for pg_stat_activity (or anything that will allow to automate query analysis)
in Postgres 12 or later -- this would be a great news and huge support for engineers.
Same level as recently implemented sampling for statement logging.
By the way, if queryid goes to the core someday, I'm sure it is worth to consider using
it in logs as well.
Thanks,
Nik