Update example of process titles shown by "ps".
authorTom Lane
Fri, 11 May 2012 22:33:39 +0000 (18:33 -0400)
committerTom Lane
Fri, 11 May 2012 22:33:39 +0000 (18:33 -0400)
This example was quite old: it lacked the WAL writer and autovac launcher
as well as the more recently added checkpointer.  Linux "ps" seems to show
slightly different stuff now too.

doc/src/sgml/monitoring.sgml

index b27c6861302eee37a0384532fec40a88374c0ec5..830f6217d2e0c353523d3a2ba13005b79ef6177f 100644 (file)
 
 
 $ 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   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
+postgres  15551  0.0  0.1  57536  7132 pts/0    S    18:02   0:00 postgres -i
+postgres  15554  0.0  0.0  57536  1184 ?        Ss   18:02   0:00 postgres: writer process
+postgres  15555  0.0  0.0  57536   916 ?        Ss   18:02   0:00 postgres: checkpointer process
+postgres  15556  0.0  0.0  57536   916 ?        Ss   18:02   0:00 postgres: wal writer process
+postgres  15557  0.0  0.0  58504  2244 ?        Ss   18:02   0:00 postgres: autovacuum launcher process
+postgres  15558  0.0  0.0  17512  1068 ?        Ss   18:02   0:00 postgres: stats collector process
+postgres  15582  0.0  0.0  58772  3080 ?        Ss   18:04   0:00 postgres: joe runbug 127.0.0.1 idle
+postgres  15606  0.0  0.0  58772  3052 ?        Ss   18:07   0:00 postgres: tgl regression [local] SELECT waiting
+postgres  15610  0.0  0.0  58772  3056 ?        Ss   18:07   0:00 postgres: tgl regression [local] idle in transaction
 
 
    (The appropriate invocation of ps varies across different
    platforms, as do the details of what is shown.  This example is from a
    recent Linux system.)  The first process listed here is the
    master server process.  The command arguments
-   shown for it are the same ones used when it was launched.  The next two
+   shown for it are the same ones used when it was launched.  The next five
    processes are background worker processes automatically launched by the
    master process.  (The stats collector process will not be present
-   if you have set
-   the system not to start the statistics collector.)  Each of the remaining
+   if you have set the system not to start the statistics collector; likewise
+   the autovacuum launcher process can be disabled.)
+   Each of the remaining
    processes is a server process handling one client connection.  Each such
    process sets its command line display in the form
 
@@ -79,8 +83,12 @@ postgres: user database host 
   or a command type name such as SELECT.  Also,
   waiting is appended if the server process is presently waiting
   on a lock held by another session.  In the above example we can infer
-  that process 1003 is waiting for process 1016 to complete its transaction and
-  thereby release some lock.
+  that process 15606 is waiting for process 15610 to complete its transaction
+  and thereby release some lock.  (Process 15610 must be the blocker, because
+  there is no other active session.  In more complicated cases it would be
+  necessary to look into the
+  pg_locks
+  system view to determine who is blocking whom.)