48
48
49
49
<screen>
50
50
$ ps auxww | grep ^postgres
51
- postgres 960 0.0 1.1 6104 1480 pts/1 SN 13:17 0:00 postgres -i
52
- postgres 963 0.0 1.1 7084 1472 pts/1 SN 13:17 0:00 postgres: writer process
53
- postgres 965 0.0 1.1 6152 1512 pts/1 SN 13:17 0:00 postgres: stats collector process
54
- postgres 998 0.0 2.3 6532 2992 pts/1 SN 13:18 0:00 postgres: tgl runbug 127.0.0.1 idle
55
- postgres 1003 0.0 2.4 6532 3128 pts/1 SN 13:19 0:00 postgres: tgl regression [local] SELECT waiting
56
- postgres 1016 0.1 2.4 6532 3080 pts/1 SN 13:19 0:00 postgres: tgl regression [local] idle in transaction
51
+ postgres 15551 0.0 0.1 57536 7132 pts/0 S 18:02 0:00 postgres -i
52
+ postgres 15554 0.0 0.0 57536 1184 ? Ss 18:02 0:00 postgres: writer process
53
+ postgres 15555 0.0 0.0 57536 916 ? Ss 18:02 0:00 postgres: checkpointer process
54
+ postgres 15556 0.0 0.0 57536 916 ? Ss 18:02 0:00 postgres: wal writer process
55
+ postgres 15557 0.0 0.0 58504 2244 ? Ss 18:02 0:00 postgres: autovacuum launcher process
56
+ postgres 15558 0.0 0.0 17512 1068 ? Ss 18:02 0:00 postgres: stats collector process
57
+ postgres 15582 0.0 0.0 58772 3080 ? Ss 18:04 0:00 postgres: joe runbug 127.0.0.1 idle
58
+ postgres 15606 0.0 0.0 58772 3052 ? Ss 18:07 0:00 postgres: tgl regression [local] SELECT waiting
59
+ postgres 15610 0.0 0.0 58772 3056 ? Ss 18:07 0:00 postgres: tgl regression [local] idle in transaction
57
60
</screen>
58
61
59
62
(The appropriate invocation of <command>ps</> varies across different
60
63
platforms, as do the details of what is shown. This example is from a
61
64
recent Linux system.) The first process listed here is the
62
65
master server process. The command arguments
63
- shown for it are the same ones used when it was launched. The nexttwo
66
+ shown for it are the same ones used when it was launched. The nextfive
64
67
processes are background worker processes automatically launched by the
65
68
master process. (The <quote>stats collector</> process will not be present
66
- if you have set
67
- the system not to start the statistics collector.) Each of the remaining
69
+ if you have set the system not to start the statistics collector; likewise
70
+ the <quote>autovacuum launcher</> process can be disabled.)
71
+ Each of the remaining
68
72
processes is a server process handling one client connection. Each such
69
73
process sets its command line display in the form
70
74
@@ -79,8 +83,12 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
79
83
or a command type name such as <literal>SELECT</>. Also,
80
84
<literal>waiting</> is appended if the server process is presently waiting
81
85
on a lock held by another session. In the above example we can infer
82
- that process 1003 is waiting for process 1016 to complete its transaction and
83
- thereby release some lock.
86
+ that process 15606 is waiting for process 15610 to complete its transaction
87
+ and thereby release some lock. (Process 15610 must be the blocker, because
88
+ there is no other active session. In more complicated cases it would be
89
+ necessary to look into the
90
+ <link linkend="view-pg-locks"><structname>pg_locks</structname></link>
91
+ system view to determine who is blocking whom.)
84
92
</para>
85
93
86
94
<para>