-
+
Monitoring Database Activity
$ ps auxww | grep ^postgres
postgres 960 0.0 1.1 6104 1480 pts/1 SN 13:17 0:00 postgres -i
postgres 963 0.0 1.1 7084 1472 pts/1 SN 13:17 0:00 postgres: writer process
-postgres 965 0.0 1.1 6152 1512 pts/1 SN 13:17 0:00 postgres: stats collector process
+postgres 965 0.0 1.1 6152 1512 pts/1 SN 13:17 0:00 postgres: stats collector process
postgres 998 0.0 2.3 6532 2992 pts/1 SN 13:18 0:00 postgres: tgl runbug 127.0.0.1 idle
postgres 1003 0.0 2.4 6532 3128 pts/1 SN 13:19 0:00 postgres: tgl regression [local] SELECT waiting
postgres 1016 0.1 2.4 6532 3080 pts/1 SN 13:19 0:00 postgres: tgl regression [local] idle in transaction
- The statistics collector communicates with the backends needing
+ The statistics collector communicates with the backends needing
information (including autovacuum) through temporary files.
These files are stored in the pg_stat_tmp subdirectory.
When the postmaster shuts down, a permanent copy of the statistics
pg_stat_activity>
One row per server process, showing database OID, database
name, process
ID>, user OID, user name, application name,
- current query, query's waiting status, time at which the current
- transaction and current query began execution, time at which the
- process was started, and client's address and port number.
+ client's address and port number, times at which the server process,
+ current transaction, and current query began execution, process's waiting
+ status, and text of the current query.
The columns that report data on the current query are available unless
the parameter track_activities has been turned off.
Furthermore, these columns are only visible if the user examining
Beginning in
PostgreSQL 8.1, indexes can be
used either directly or via bitmap scans>. In a bitmap scan
the output of several indexes can be combined via AND or OR rules;
- so it is difficult to associate individual heap row fetches
+ so it is difficult to associate individual heap row fetches
with specific indexes when a bitmap scan is used. Therefore, a bitmap
scan increments the
pg_stat_all_indexes>.idx_tup_read>
Returns a record of information about the backend with the specified pid, or
one record for each active backend in the system if NULL is
- specified. The fields returned are the same as in the
+ specified. The fields returned are a subset of those in the
pg_stat_activity view.