public inbox for [email protected]help / color / mirror / Atom feed
pgsql: Fix pg_stat_get_backend_wait_event() for aux processes 6+ messages / 1 participants [nested] [flat]
* pgsql: Fix pg_stat_get_backend_wait_event() for aux processes @ 2026-02-11 17:00 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2026-02-11 17:00 UTC (permalink / raw) To: [email protected] Fix pg_stat_get_backend_wait_event() for aux processes The pg_stat_activity view shows information for aux processes, but the pg_stat_get_backend_wait_event() and pg_stat_get_backend_wait_event_type() functions did not. To fix, call AuxiliaryPidGetProc(pid) if BackendPidGetProc(pid) returns NULL, like we do in pg_stat_get_activity(). In version 17 and above, it's a little silly to use those functions when we already have the ProcNumber at hand, but it was necessary before v17 because the backend ID was different from ProcNumber. I have other plans for wait_event_info on master, so it doesn't seem worth applying a different fix on different versions now. Reviewed-by: Sami Imseih <[email protected]> Reviewed-by: Chao Li <[email protected]> Reviewed-by: Kyotaro Horiguchi <[email protected]> Discussion: https://www.postgresql.org/message-id/[email protected] Backpatch-through: 14 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ebc53ca7b2ff339a9455ccdc368d39ebb39a0762 Modified Files -------------- src/backend/utils/adt/pgstatfuncs.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix pg_stat_get_backend_wait_event() for aux processes @ 2026-02-11 17:00 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2026-02-11 17:00 UTC (permalink / raw) To: [email protected] Fix pg_stat_get_backend_wait_event() for aux processes The pg_stat_activity view shows information for aux processes, but the pg_stat_get_backend_wait_event() and pg_stat_get_backend_wait_event_type() functions did not. To fix, call AuxiliaryPidGetProc(pid) if BackendPidGetProc(pid) returns NULL, like we do in pg_stat_get_activity(). In version 17 and above, it's a little silly to use those functions when we already have the ProcNumber at hand, but it was necessary before v17 because the backend ID was different from ProcNumber. I have other plans for wait_event_info on master, so it doesn't seem worth applying a different fix on different versions now. Reviewed-by: Sami Imseih <[email protected]> Reviewed-by: Chao Li <[email protected]> Reviewed-by: Kyotaro Horiguchi <[email protected]> Discussion: https://www.postgresql.org/message-id/[email protected] Backpatch-through: 14 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/82b495cdd7ec1e7bfcfa497ce2138d3ce5a8fa43 Modified Files -------------- src/backend/utils/adt/pgstatfuncs.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix pg_stat_get_backend_wait_event() for aux processes @ 2026-02-11 17:00 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2026-02-11 17:00 UTC (permalink / raw) To: [email protected] Fix pg_stat_get_backend_wait_event() for aux processes The pg_stat_activity view shows information for aux processes, but the pg_stat_get_backend_wait_event() and pg_stat_get_backend_wait_event_type() functions did not. To fix, call AuxiliaryPidGetProc(pid) if BackendPidGetProc(pid) returns NULL, like we do in pg_stat_get_activity(). In version 17 and above, it's a little silly to use those functions when we already have the ProcNumber at hand, but it was necessary before v17 because the backend ID was different from ProcNumber. I have other plans for wait_event_info on master, so it doesn't seem worth applying a different fix on different versions now. Reviewed-by: Sami Imseih <[email protected]> Reviewed-by: Chao Li <[email protected]> Reviewed-by: Kyotaro Horiguchi <[email protected]> Discussion: https://www.postgresql.org/message-id/[email protected] Backpatch-through: 14 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/78a5e3074b824b4bbcb75ea4dd565ce735f54293 Modified Files -------------- src/backend/utils/adt/pgstatfuncs.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix pg_stat_get_backend_wait_event() for aux processes @ 2026-02-11 17:00 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2026-02-11 17:00 UTC (permalink / raw) To: [email protected] Fix pg_stat_get_backend_wait_event() for aux processes The pg_stat_activity view shows information for aux processes, but the pg_stat_get_backend_wait_event() and pg_stat_get_backend_wait_event_type() functions did not. To fix, call AuxiliaryPidGetProc(pid) if BackendPidGetProc(pid) returns NULL, like we do in pg_stat_get_activity(). In version 17 and above, it's a little silly to use those functions when we already have the ProcNumber at hand, but it was necessary before v17 because the backend ID was different from ProcNumber. I have other plans for wait_event_info on master, so it doesn't seem worth applying a different fix on different versions now. Reviewed-by: Sami Imseih <[email protected]> Reviewed-by: Chao Li <[email protected]> Reviewed-by: Kyotaro Horiguchi <[email protected]> Discussion: https://www.postgresql.org/message-id/[email protected] Backpatch-through: 14 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/53463b4b2484c9523a248de90c097b1394501d86 Modified Files -------------- src/backend/utils/adt/pgstatfuncs.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix pg_stat_get_backend_wait_event() for aux processes @ 2026-02-11 17:00 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2026-02-11 17:00 UTC (permalink / raw) To: [email protected] Fix pg_stat_get_backend_wait_event() for aux processes The pg_stat_activity view shows information for aux processes, but the pg_stat_get_backend_wait_event() and pg_stat_get_backend_wait_event_type() functions did not. To fix, call AuxiliaryPidGetProc(pid) if BackendPidGetProc(pid) returns NULL, like we do in pg_stat_get_activity(). In version 17 and above, it's a little silly to use those functions when we already have the ProcNumber at hand, but it was necessary before v17 because the backend ID was different from ProcNumber. I have other plans for wait_event_info on master, so it doesn't seem worth applying a different fix on different versions now. Reviewed-by: Sami Imseih <[email protected]> Reviewed-by: Chao Li <[email protected]> Reviewed-by: Kyotaro Horiguchi <[email protected]> Discussion: https://www.postgresql.org/message-id/[email protected] Backpatch-through: 14 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/84247333792ce03c69659104b5ff68354a2c88f7 Modified Files -------------- src/backend/utils/adt/pgstatfuncs.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix pg_stat_get_backend_wait_event() for aux processes @ 2026-02-11 17:00 Heikki Linnakangas <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2026-02-11 17:00 UTC (permalink / raw) To: [email protected] Fix pg_stat_get_backend_wait_event() for aux processes The pg_stat_activity view shows information for aux processes, but the pg_stat_get_backend_wait_event() and pg_stat_get_backend_wait_event_type() functions did not. To fix, call AuxiliaryPidGetProc(pid) if BackendPidGetProc(pid) returns NULL, like we do in pg_stat_get_activity(). In version 17 and above, it's a little silly to use those functions when we already have the ProcNumber at hand, but it was necessary before v17 because the backend ID was different from ProcNumber. I have other plans for wait_event_info on master, so it doesn't seem worth applying a different fix on different versions now. Reviewed-by: Sami Imseih <[email protected]> Reviewed-by: Chao Li <[email protected]> Reviewed-by: Kyotaro Horiguchi <[email protected]> Discussion: https://www.postgresql.org/message-id/[email protected] Backpatch-through: 14 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2332911ae6f4b9ccd775048d8c0e8f3d68bb0418 Modified Files -------------- src/backend/utils/adt/pgstatfuncs.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2026-02-11 17:00 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-02-11 17:00 pgsql: Fix pg_stat_get_backend_wait_event() for aux processes Heikki Linnakangas <[email protected]> 2026-02-11 17:00 pgsql: Fix pg_stat_get_backend_wait_event() for aux processes Heikki Linnakangas <[email protected]> 2026-02-11 17:00 pgsql: Fix pg_stat_get_backend_wait_event() for aux processes Heikki Linnakangas <[email protected]> 2026-02-11 17:00 pgsql: Fix pg_stat_get_backend_wait_event() for aux processes Heikki Linnakangas <[email protected]> 2026-02-11 17:00 pgsql: Fix pg_stat_get_backend_wait_event() for aux processes Heikki Linnakangas <[email protected]> 2026-02-11 17:00 pgsql: Fix pg_stat_get_backend_wait_event() for aux processes Heikki Linnakangas <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox