1PMDAPOSTGRESQL(1) General Commands Manual PMDAPOSTGRESQL(1)
2
3
4
6 pmdapostgresql - PostgreSQL database PMDA
7
9 pmdapostgresql is a Performance Co-Pilot (PCP) Performance Metrics Do‐
10 main Agent (PMDA) which extracts live performance data from a running
11 PostgreSQL database server.
12
13 Many of the statistics available from a PostgreSQL server may not be
14 enabled by default. Refer to the online documentation
15 https://www.postgresql.org/docs/current/static/monitoring-stats.html
16 which describes each of the available parameters related to statistics
17 collection and how to enable them.
18
20 pmdapostgresql reads a mandatory ini-style configuration file:
21
22 $PCP_PMDAS_DIR/postgresql/postgresql.conf
23
24 This file currently contains only one section [authentication] which
25 specifies values for the following settings (their default values are
26 shown in parenthesis):
27
28 host (local) Hostname to connect to.
29
30 port (5432) Port number to use.
31
32 dbname (postgres)
33 Database name.
34
35 username (postgres)
36 Username to run as and to connect to the database.
37
38 password (password)
39 Password to connect to the database.
40
41 osuser (unset) Operating system user the PMDA runs as.
42
43 The defaults (as above) will result in the PMDA running as the current
44 user, using a UNIX domain socket connection to the PostgreSQL server on
45 the localhost.
46
47 If osuser is not specified in the configuration file, the PMDA will run
48 as the current user. A host specification of local will use a UNIX do‐
49 main socket, which uses peer authentication, see comments in the
50 pg_hba.conf file. In this case, the osuser setting should probably be
51 set to postgres.
52
53 It is generally not necessary to alter the default configuration file
54 for monitoring the local PostgreSQL server instance with a default
55 server configuration. Note that the port number is required even for a
56 UNIX domain connection because it's used as the socket filename by the
57 server.
58
60 To install, the following must be done as root:
61
62 # cd $PCP_PMDAS_DIR/postgresql
63 # ./Install
64
65 To uninstall, the following must be done as root:
66
67 # cd $PCP_PMDAS_DIR/postgresql
68 # ./Remove
69
70 pmdapostgresql is launched by pmcd(1) and should never be executed di‐
71 rectly. The Install and Remove scripts notify pmcd(1) when the agent
72 is installed or removed.
73
74 pmdapostgresql will automatically attempt to reconnect to the Post‐
75 greSQL server if its connection is lost - e.g. if the PostgreSQL ser‐
76 vice is restarted.
77
79 This version of pmdapostgresql has been tested and verified with Post‐
80 greSQL server version 10.2 and earlier. Later versions will probably
81 also work correctly because the PMDA probes the various performance ta‐
82 bles on start-up to determine the column ordering. It also tolerates
83 missing or renamed tables and/or columns.
84
86 $PCP_PMDAS_DIR/postgresql/pmdapostgresql.conf
87 configuration file for the pmdapostgresql agent
88
89 $PCP_PMDAS_DIR/postgresql/Install
90 installation script for the pmdapostgresql agent
91
92 $PCP_PMDAS_DIR/postgresql/Remove
93 undo installation script for the pmdapostgresql agent
94
95 $PCP_LOG_DIR/pmcd/postgresql.log
96 default log file for messages from the pmdapostgresql agent
97
98 Note that the usual/default value for $PCP_PMDAS_DIR is
99 /var/lib/pcp/pmdas and the default for $PCP_LOG_DIR is /var/log/pcp but
100 these settings are platform dependent.
101
103 Environment variables with the prefix PCP_ are used to parameterize the
104 file and directory names used by PCP. On each installation, the file
105 /etc/pcp.conf contains the local values for these variables. The
106 $PCP_CONF variable may be used to specify an alternative configuration
107 file, as described in pcp.conf(5).
108
110 PCPIntro(1), pmcd(1) and https://www.postgresql.org/docs/cur‐
111 rent/static/monitoring-stats.html.
112
113
114
115Performance Co-Pilot PCP PMDAPOSTGRESQL(1)