pg_wait_sampling icon indicating copy to clipboard operation
pg_wait_sampling copied to clipboard

add isBackgroundWorker, databaseId and roleId to pg_wait_sampling_current view

Open DmitryNFomin opened this issue 9 months ago • 2 comments

For better visibility we need to know type of the backend of pid that we collected wait info. It can be done by joining with pg_stat_activity view by pid, but this is not possible for short living backends, pid does not exist anymore when exporter or some other process comes to collect data To address this problem I would like to add data that we can get from PGPROC that can help identify backend (at least if was regular backend and if yes which database and role) It's just to explain idea, if you find it good idea I will add code for history and profile views

DmitryNFomin avatar Mar 07 '25 15:03 DmitryNFomin

So for now we will think of how to carefully add new fields that were discussed in #94 (maybe all of them, maybe some of them, maybe will add some additional ones) and will add them ourselves. Not closing this pull request yet but it probably won't be merged

Medvecrab avatar Mar 12 '25 02:03 Medvecrab

So for now we will think of how to carefully add new fields that were discussed in #94 (maybe all of them, maybe some of them, maybe will add some additional ones) and will add them ourselves. Not closing this pull request yet but it probably won't be merged

I would be happy as a user to have all this fields in new version, as far as I can understand some changes needs more work while this change is quite simple and probably we can have merged this while more complicated changes are being worked on.

anyway many thanks for your extension, my personal view that wait event analysis should take centra position l in postgres load profile assessment and troubleshooting, like ASH in Oracle

DmitryNFomin avatar Mar 12 '25 12:03 DmitryNFomin

This pull request is obsoleted by #104

Medvecrab avatar Oct 22 '25 07:10 Medvecrab