pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Show more processes in pg_stat_activity.
2+ messages / 2 participants
[nested] [flat]
* pgsql: Show more processes in pg_stat_activity.
@ 2017-03-27 02:07 Robert Haas <rhaas@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: Robert Haas @ 2017-03-27 02:07 UTC (permalink / raw)
To: pgsql-committers
Show more processes in pg_stat_activity.
Previously, auxiliary processes and background workers not connected
to a database (such as the logical replication launcher) weren't
shown. Include them, so that we can see the associated wait state
information. Add a new column to identify the processes type, so that
people can filter them out easily using SQL if they wish.
Before this patch was written, there was discussion about whether we
should expose this information in a separate view, so as to avoid
contaminating pg_stat_activity with things people might not want to
see. But putting everything in pg_stat_activity was a more popular
choice, so that's what the patch does.
Kuntal Ghosh, reviewed by Amit Langote and Michael Paquier. Some
revisions and bug fixes by me.
Discussion: http://postgr.es/m/CA+TgmoYES5nhkEGw9nZXU8_FhA8XEm8NTm3-SO+3ML1B81Hkww@mail.gmail.com
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/fc70a4b0df38bda6a13941f1581f25fbb643c7f3
Modified Files
--------------
doc/src/sgml/monitoring.sgml | 15 ++-
src/backend/bootstrap/bootstrap.c | 4 +
src/backend/catalog/system_views.sql | 3 +-
src/backend/postmaster/pgstat.c | 194 ++++++++++++++++++++++++++++++-----
src/backend/postmaster/startup.c | 1 +
src/backend/replication/walsender.c | 4 +-
src/backend/storage/lmgr/proc.c | 27 +++++
src/backend/utils/adt/pgstatfuncs.c | 60 ++++++++---
src/backend/utils/init/postinit.c | 8 ++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 2 +-
src/include/pgstat.h | 26 +++++
src/include/storage/proc.h | 3 +-
src/test/regress/expected/rules.out | 9 +-
14 files changed, 305 insertions(+), 53 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [COMMITTERS] pgsql: Show more processes in pg_stat_activity.
@ 2017-03-27 02:20 Michael Paquier <michael.paquier@gmail.com>
parent: Robert Haas <rhaas@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Michael Paquier @ 2017-03-27 02:20 UTC (permalink / raw)
To: Robert Haas <rhaas@postgresql.org>; +Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
On Mon, Mar 27, 2017 at 11:07 AM, Robert Haas <rhaas@postgresql.org> wrote:
> Show more processes in pg_stat_activity.
>
> Previously, auxiliary processes and background workers not connected
> to a database (such as the logical replication launcher) weren't
> shown. Include them, so that we can see the associated wait state
> information. Add a new column to identify the processes type, so that
> people can filter them out easily using SQL if they wish.
>
> Before this patch was written, there was discussion about whether we
> should expose this information in a separate view, so as to avoid
> contaminating pg_stat_activity with things people might not want to
> see. But putting everything in pg_stat_activity was a more popular
> choice, so that's what the patch does.
>
> Kuntal Ghosh, reviewed by Amit Langote and Michael Paquier. Some
> revisions and bug fixes by me.
- /* Report to pgstat that this process is a WAL sender */
- pgstat_report_activity(STATE_RUNNING, "walsender");
+ /* Report to pgstat that this process is running */
+ pgstat_report_activity(STATE_RUNNING, NULL);
Perhaps this bit should just be removed? We added it to make the
process show in pg_stat_activity, and with this patch it does show up
even without this call.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2017-03-27 02:20 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-03-27 02:07 pgsql: Show more processes in pg_stat_activity. Robert Haas <rhaas@postgresql.org>
2017-03-27 02:20 ` Michael Paquier <michael.paquier@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox