diff options
author | Robert Haas <rhaas@postgresql.org> | 2017-03-26 22:02:22 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2017-03-26 22:02:22 -0400 |
commit | fc70a4b0df38bda6a13941f1581f25fbb643c7f3 (patch) | |
tree | 87ee4eec5f4bc96bacad8e8c5313abc5f9c3f367 /src/include/storage/proc.h | |
parent | 2f0903ea196503fc8af373a9de46b1e01a23508c (diff) | |
download | postgresql-fc70a4b0df38bda6a13941f1581f25fbb643c7f3.tar.gz postgresql-fc70a4b0df38bda6a13941f1581f25fbb643c7f3.zip |
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
Diffstat (limited to 'src/include/storage/proc.h')
-rw-r--r-- | src/include/storage/proc.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index 1b345faa2dc..1a125d83f40 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -272,7 +272,6 @@ extern PGPROC *PreparedXactProcs; */ #define NUM_AUXILIARY_PROCS 4 - /* configurable options */ extern int DeadlockTimeout; extern int StatementTimeout; @@ -309,6 +308,8 @@ extern void LockErrorCleanup(void); extern void ProcWaitForSignal(uint32 wait_event_info); extern void ProcSendSignal(int pid); +extern PGPROC *AuxiliaryPidGetProc(int pid); + extern void BecomeLockGroupLeader(void); extern bool BecomeLockGroupMember(PGPROC *leader, int pid); |