diff options
| author | Neil Conway <neilc@samurai.com> | 2005-05-09 11:31:34 +0000 |
|---|---|---|
| committer | Neil Conway <neilc@samurai.com> | 2005-05-09 11:31:34 +0000 |
| commit | 4744c1a0a16d4fdad4196c9874e050936e1133ed (patch) | |
| tree | f7d0464971f8d6046e0b3e8522e211869e14bbc7 /src/include/pgstat.h | |
| parent | d8c21181ce406b313bddfdaf49d66458942c16ed (diff) | |
Complete the following TODO items:
* Add session start time to pg_stat_activity
* Add the client IP address and port to pg_stat_activity
Original patch from Magnus Hagander, code review by Neil Conway. Catalog
version bumped. This patch sends the client IP address and port number in
every statistics message; that's not ideal, but will be fixed up shortly.
Diffstat (limited to 'src/include/pgstat.h')
| -rw-r--r-- | src/include/pgstat.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 31e01e4ed44..e38e33536ac 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -5,17 +5,17 @@ * * Copyright (c) 2001-2005, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.27 2005/01/01 05:43:08 momjian Exp $ + * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.28 2005/05/09 11:31:33 neilc Exp $ * ---------- */ #ifndef PGSTAT_H #define PGSTAT_H +#include "libpq/pqcomm.h" #include "utils/hsearch.h" #include "utils/nabstime.h" #include "utils/rel.h" - /* ---------- * The types of backend/postmaster -> collector messages * ---------- @@ -54,6 +54,7 @@ typedef struct PgStat_MsgHdr int m_procpid; Oid m_databaseid; AclId m_userid; + SockAddr m_clientaddr; } PgStat_MsgHdr; /* ---------- @@ -231,8 +232,11 @@ typedef struct PgStat_StatBeEntry Oid databaseid; Oid userid; int procpid; + AbsoluteTime start_sec; + int start_usec; AbsoluteTime activity_start_sec; int activity_start_usec; + SockAddr clientaddr; char activity[PGSTAT_ACTIVITY_SIZE]; } PgStat_StatBeEntry; |
