diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-08-19 01:36:34 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-08-19 01:36:34 +0000 |
commit | 9bf760f7dec703aa34d9bd68aaa982943d24411e (patch) | |
tree | f36eed206a58dce384a76c27f77213a6444aaef7 /src/include/pgstat.h | |
parent | 1be439084a380bc3f1576e2a2834839e508122dd (diff) |
Add a 'waiting' column to pg_stat_activity to carry the same information
that ps_status provides by appending 'waiting' to the PS display. This
completes the project of making it feasible to turn off process title
updates and instead rely on pg_stat_activity. Per my suggestion a few
weeks ago.
Diffstat (limited to 'src/include/pgstat.h')
-rw-r--r-- | src/include/pgstat.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 72e542f16c8..35614eaa2d2 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -5,7 +5,7 @@ * * Copyright (c) 2001-2006, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.48 2006/06/29 20:00:08 tgl Exp $ + * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.49 2006/08/19 01:36:34 tgl Exp $ * ---------- */ #ifndef PGSTAT_H @@ -334,6 +334,9 @@ typedef struct PgBackendStatus Oid st_userid; SockAddr st_clientaddr; + /* Is backend currently waiting on an lmgr lock? */ + bool st_waiting; + /* current command string; MUST be null-terminated */ char st_activity[PGBE_ACTIVITY_SIZE]; } PgBackendStatus; @@ -387,6 +390,7 @@ extern void pgstat_report_analyze(Oid tableoid, bool shared, extern void pgstat_bestart(void); extern void pgstat_report_activity(const char *what); +extern void pgstat_report_waiting(bool waiting); extern void pgstat_initstats(PgStat_Info *stats, Relation rel); |