1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY postgresql-download-http "http://ftp.postgresql.org/pub/source/v&postgresql-version;/postgresql-&postgresql-version;.tar.bz2">
|
---|
8 | <!ENTITY postgresql-download-ftp "ftp://ftp.postgresql.org/pub/source/v&postgresql-version;/postgresql-&postgresql-version;.tar.bz2">
|
---|
9 | <!ENTITY postgresql-md5sum "a5fe5fdff2d6c28f65601398be0950df">
|
---|
10 | <!ENTITY postgresql-size "20 MB">
|
---|
11 | <!ENTITY postgresql-buildsize "224 MB (add 32 MB for tests)">
|
---|
12 | <!ENTITY postgresql-time "0.7 SBU (with parallelism=4, add 0.1 SBU for tests)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="postgresql" xreflabel="PostgreSQL-&postgresql-version;">
|
---|
16 | <?dbhtml filename="postgresql.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>PostgreSQL-&postgresql-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="postgresql">
|
---|
26 | <primary sortas="a-PostgreSQL">PostgreSQL</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to PostgreSQL</title>
|
---|
31 |
|
---|
32 | <para><application>PostgreSQL</application> is an advanced
|
---|
33 | object-relational database management system (ORDBMS), derived
|
---|
34 | from the Berkeley Postgres database management system.</para>
|
---|
35 |
|
---|
36 | &lfs83_checked;
|
---|
37 |
|
---|
38 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
39 | <itemizedlist spacing="compact">
|
---|
40 | <listitem>
|
---|
41 | <para>Download (HTTP): <ulink url="&postgresql-download-http;"/></para>
|
---|
42 | </listitem>
|
---|
43 | <listitem>
|
---|
44 | <para>Download (FTP): <ulink url="&postgresql-download-ftp;"/></para>
|
---|
45 | </listitem>
|
---|
46 | <listitem>
|
---|
47 | <para>Download MD5 sum: &postgresql-md5sum;</para>
|
---|
48 | </listitem>
|
---|
49 | <listitem>
|
---|
50 | <para>Download size: &postgresql-size;</para>
|
---|
51 | </listitem>
|
---|
52 | <listitem>
|
---|
53 | <para>Estimated disk space required: &postgresql-buildsize;</para>
|
---|
54 | </listitem>
|
---|
55 | <listitem>
|
---|
56 | <para>Estimated build time: &postgresql-time;</para>
|
---|
57 | </listitem>
|
---|
58 | </itemizedlist>
|
---|
59 |
|
---|
60 | <bridgehead renderas="sect3">PostgreSQL Dependencies</bridgehead>
|
---|
61 |
|
---|
62 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
63 | <para role="optional">
|
---|
64 | <xref linkend="python2"/>,
|
---|
65 | <xref linkend="tcl"/>,
|
---|
66 | <xref linkend="libxml2"/>,
|
---|
67 | <xref linkend="libxslt"/>,
|
---|
68 | <xref linkend="openldap"/>,
|
---|
69 | <xref linkend="linux-pam"/>,
|
---|
70 | <xref linkend="mitkrb"/> and
|
---|
71 | <ulink url="http://developer.apple.com/networking/bonjour/">Bonjour</ulink>
|
---|
72 | </para>
|
---|
73 |
|
---|
74 | <bridgehead renderas="sect4">Optional (To Regenerate Documentation)</bridgehead>
|
---|
75 | <para role="optional">
|
---|
76 | <xref linkend="sgml-dtd"/>,
|
---|
77 | <xref linkend="docbook-dsssl"/>,
|
---|
78 | <xref linkend="openjade"/>, and
|
---|
79 | <xref linkend="perl-sgmlspm"/>
|
---|
80 | </para>
|
---|
81 |
|
---|
82 | <para condition="html" role="usernotes">User Notes:
|
---|
83 | <ulink url="&blfs-wiki;/postgresql"/></para>
|
---|
84 |
|
---|
85 | </sect2>
|
---|
86 |
|
---|
87 | <sect2 role="installation">
|
---|
88 | <title>Installation of PostgreSQL</title>
|
---|
89 |
|
---|
90 | <para>
|
---|
91 | For enhanced security, it is better to have a dedicated group and user
|
---|
92 | for running the PostgreSQL server. First, issue as the
|
---|
93 | <systemitem class="username">root</systemitem> user:
|
---|
94 | </para>
|
---|
95 |
|
---|
96 | <screen role="root"><userinput>groupadd -g 41 postgres &&
|
---|
97 | useradd -c "PostgreSQL Server" -g postgres -d /srv/pgsql/data \
|
---|
98 | -u 41 postgres</userinput></screen>
|
---|
99 |
|
---|
100 | <note><para>There are several configuration items that add additional
|
---|
101 | functionality with optional packages to
|
---|
102 | <application>PostgreSQL</application>. Use <userinput>./configure
|
---|
103 | --help</userinput> to see a list.</para></note>
|
---|
104 |
|
---|
105 | <para>Install <application>PostgreSQL</application> with the
|
---|
106 | following commands: </para>
|
---|
107 |
|
---|
108 | <screen><userinput>sed -i '/DEFAULT_PGSOCKET_DIR/s@/tmp@/run/postgresql@' src/include/pg_config_manual.h &&
|
---|
109 |
|
---|
110 | ./configure --prefix=/usr \
|
---|
111 | --enable-thread-safety \
|
---|
112 | --docdir=/usr/share/doc/postgresql-&postgresql-version; &&
|
---|
113 | make</userinput></screen>
|
---|
114 |
|
---|
115 | <para>There are a number of programs in the
|
---|
116 | <filename class="directory">contrib/</filename> directory. If you are going
|
---|
117 | to run this installation as a server and wish to build some of them, enter
|
---|
118 | <command>make -C contrib</command> or
|
---|
119 | <command>make -C contrib/<replaceable><SUBDIR-NAME></replaceable></command> for each subdirectory.
|
---|
120 | </para>
|
---|
121 |
|
---|
122 | <para>Tests must be run as an unprivileged user because they need to start a
|
---|
123 | temporary server and this is prevented as the root user. For the same reason,
|
---|
124 | you need to stop all PostgreSQL servers if any are running. If a previous
|
---|
125 | version of PostgreSQL is installed, it may be necessary to use
|
---|
126 | <command>--disable-rpath</command> with <command>configure</command> to
|
---|
127 | avoid failures, but <emphasis>installing the binaries created using this
|
---|
128 | switch is not recommended</emphasis>. To test the results, issue:
|
---|
129 | <command>make check</command>.</para>
|
---|
130 |
|
---|
131 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
132 |
|
---|
133 | <screen role="root"><userinput>make install &&
|
---|
134 | make install-docs</userinput></screen>
|
---|
135 |
|
---|
136 | <para>If you made any of the <filename class="directory">contrib/</filename>
|
---|
137 | programs, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
138 |
|
---|
139 | <screen role="nodump/"><userinput>make -C contrib/<replaceable><SUBDIR-NAME></replaceable> install</userinput></screen>
|
---|
140 |
|
---|
141 | <para><emphasis>If you only intend to use
|
---|
142 | <application>PostgreSQL</application> as a client to connect to a server on
|
---|
143 | another machine, your installation is complete and you should not run the
|
---|
144 | remaining commands.</emphasis></para>
|
---|
145 |
|
---|
146 | <!-- 'Upgrading' seems to only ever exist in the docs for *previous* version -->
|
---|
147 | <!-- Obsolete: only if upgrading for versions prior to 9 <note>
|
---|
148 | <para>If you are upgrading an existing system and are going to install
|
---|
149 | the new files over the old ones, then you should back up your data, shut
|
---|
150 | down the old server and follow the instructions in <ulink
|
---|
151 | url="http://www.postgresql.org/docs/9.0/static/install-upgrading.html">the
|
---|
152 | official <application>PostgreSQL</application> documentation</ulink>.</para>
|
---|
153 | </note>-->
|
---|
154 |
|
---|
155 | <para>Initialize a database cluster with the following commands issued by the
|
---|
156 | <systemitem class="username">root</systemitem> user:</para>
|
---|
157 |
|
---|
158 | <screen role="root"><userinput>install -v -dm700 /srv/pgsql/data &&
|
---|
159 | install -v -dm755 /run/postgresql &&
|
---|
160 | chown -Rv postgres:postgres /srv/pgsql /run/postgresql</userinput></screen>
|
---|
161 |
|
---|
162 | <para>Now, initialize the database as the <systemitem
|
---|
163 | class="username">root</systemitem> user:</para>
|
---|
164 |
|
---|
165 | <screen role="root"><userinput>su - postgres -c '/usr/bin/initdb -D /srv/pgsql/data'</userinput></screen>
|
---|
166 |
|
---|
167 | </sect2>
|
---|
168 |
|
---|
169 | <sect2 role="commands">
|
---|
170 | <title>Command Explanations</title>
|
---|
171 |
|
---|
172 | <para>
|
---|
173 | <command>sed -i ...</command>: This sed changes server socket location
|
---|
174 | from <filename class="directory">/tmp</filename> to
|
---|
175 | <filename class="directory">/run/postgresql</filename><!-- and fix up the
|
---|
176 | regression tests to use <filename class="directory">/tmp</filename> so
|
---|
177 | that they can work reliably-->.
|
---|
178 | </para>
|
---|
179 |
|
---|
180 | <para><parameter>--docdir=/usr/share/doc/postgresql-&postgresql-version;</parameter>:
|
---|
181 | This switch puts the documentation in a versioned directory.</para>
|
---|
182 |
|
---|
183 | <para><parameter>--enable-thread-safety</parameter>: This switch makes the
|
---|
184 | client libraries thread-safe by allowing concurrent threads in
|
---|
185 | <filename class="libraryfile">libpq</filename> and ECPG programs to safely
|
---|
186 | control their private connection handles.</para>
|
---|
187 |
|
---|
188 | <para><option>--with-openssl</option>: builds the package with support for
|
---|
189 | <application>OpenSSL</application> encrypted connections.</para>
|
---|
190 |
|
---|
191 | <para><option>--with-perl</option>: builds the PL/Perl server-side language.
|
---|
192 | </para>
|
---|
193 |
|
---|
194 | <para><option>--with-python</option>: builds the PL/Python server-side
|
---|
195 | language. Add PYTHON=/usr/bin/python2 for Python2 support, otherwise
|
---|
196 | Python3 is used by default.</para>
|
---|
197 |
|
---|
198 | <para><option>--with-tcl</option>: builds the PL/Tcl server-side language.</para>
|
---|
199 |
|
---|
200 | </sect2>
|
---|
201 |
|
---|
202 | <sect2 role="configuration">
|
---|
203 | <title>Configuring PostgreSQL</title>
|
---|
204 |
|
---|
205 | <sect3 id="postgresql-config">
|
---|
206 | <title>Config Files</title>
|
---|
207 |
|
---|
208 | <para><filename>$PGDATA/pg_ident.con</filename>,
|
---|
209 | <filename>$PGDATA/pg_hba.conf</filename> and
|
---|
210 | <filename>$PGDATA/postgresql.conf</filename></para>
|
---|
211 |
|
---|
212 | <indexterm zone="postgresql postgresql-config">
|
---|
213 | <primary sortas="e-A.PGDATA-pg_ident.con">$PGDATA/pg_indent.con</primary>
|
---|
214 | </indexterm>
|
---|
215 |
|
---|
216 | <indexterm zone="postgresql postgresql-config">
|
---|
217 | <primary sortas="e-A.PGDATA-pg_hba.conf">$PGDATA/pg_hba_conf</primary>
|
---|
218 | </indexterm>
|
---|
219 |
|
---|
220 | <indexterm zone="postgresql postgresql-config">
|
---|
221 | <primary sortas="e-A.PGDATA-postgresql.conf">$PGDATA/postgresql.conf</primary>
|
---|
222 | </indexterm>
|
---|
223 |
|
---|
224 | <para>The <envar>PGDATA</envar> environment variable is used to
|
---|
225 | distinguish database clusters from one another by setting it to
|
---|
226 | the value of the directory which contains the cluster desired.
|
---|
227 | The three configuration files exist in every <filename
|
---|
228 | class="directory">PGDATA/</filename> directory. Details on the
|
---|
229 | format of the files and the options that can be set in each can
|
---|
230 | be found in <ulink
|
---|
231 | url="file:///usr/share/doc/postgresql-&postgresql-version;/html/index.html"/>.</para>
|
---|
232 |
|
---|
233 | </sect3>
|
---|
234 |
|
---|
235 | <sect3 id="postgresql-init">
|
---|
236 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
237 | <phrase revision="systemd">Systemd Unit</phrase></title>
|
---|
238 |
|
---|
239 | <para>Install the
|
---|
240 | <phrase revision="sysv"><filename>/etc/rc.d/init.d/postgresql</filename>
|
---|
241 | init script</phrase>
|
---|
242 | <phrase revision="systemd"><filename>postgresql.service</filename>
|
---|
243 | unit</phrase> included in the
|
---|
244 | <xref linkend="bootscripts" revision="sysv"/>
|
---|
245 | <xref linkend="systemd-units" revision="systemd"/> package.</para>
|
---|
246 |
|
---|
247 | <indexterm zone="postgresql postgresql-init">
|
---|
248 | <primary sortas="f-postgresql">postgresql</primary>
|
---|
249 | </indexterm>
|
---|
250 |
|
---|
251 | <screen role="root"><userinput>make install-postgresql</userinput></screen>
|
---|
252 |
|
---|
253 | </sect3>
|
---|
254 |
|
---|
255 | <sect3>
|
---|
256 | <title>Starting the PostgreSQL Server and Creating a Sample Database</title>
|
---|
257 |
|
---|
258 | <para>
|
---|
259 | The database server can be manually started with the following command
|
---|
260 | (as the <systemitem class="username">root</systemitem> user):
|
---|
261 | </para>
|
---|
262 |
|
---|
263 | <screen role="root"><userinput>su - postgres -c '/usr/bin/postgres -D /srv/pgsql/data > \
|
---|
264 | /srv/pgsql/data/logfile 2>&1 &'</userinput></screen>
|
---|
265 | <note>
|
---|
266 | <para>
|
---|
267 | If you are scripting this part, you should wait for the server to
|
---|
268 | start before going on, by adding for example
|
---|
269 | <command>sleep 2</command> after the above command.
|
---|
270 | </para>
|
---|
271 | </note>
|
---|
272 |
|
---|
273 | <para>
|
---|
274 | The instructions below show how to create a database, add a table to
|
---|
275 | it, insert some rows into the table and select them, to verify that the
|
---|
276 | installation is working properly. Still as user <systemitem
|
---|
277 | class="username">root</systemitem>, issue:
|
---|
278 | </para>
|
---|
279 |
|
---|
280 | <screen role="root"><userinput>su - postgres -c '/usr/bin/createdb test' &&
|
---|
281 | echo "create table t1 ( name varchar(20), state_province varchar(20) );" \
|
---|
282 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
283 | echo "insert into t1 values ('Billy', 'NewYork');" \
|
---|
284 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
285 | echo "insert into t1 values ('Evanidus', 'Quebec');" \
|
---|
286 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
287 | echo "insert into t1 values ('Jesse', 'Ontario');" \
|
---|
288 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
289 | echo "select * from t1;" | (su - postgres -c '/usr/bin/psql test')</userinput></screen>
|
---|
290 |
|
---|
291 | <para>
|
---|
292 | When you are done with testing, you can shut down the server, by issuing
|
---|
293 | as <systemitem class="username">root</systemitem>:
|
---|
294 | </para>
|
---|
295 |
|
---|
296 | <screen role="root"><userinput>su - postgres -c "/usr/bin/pg_ctl stop -D /srv/pgsql/data"</userinput></screen>
|
---|
297 |
|
---|
298 | </sect3>
|
---|
299 |
|
---|
300 | </sect2>
|
---|
301 |
|
---|
302 | <sect2 role="content">
|
---|
303 | <title>Contents</title>
|
---|
304 |
|
---|
305 | <segmentedlist>
|
---|
306 | <segtitle>Installed Programs</segtitle>
|
---|
307 | <segtitle>Installed Libraries</segtitle>
|
---|
308 | <segtitle>Installed Directories</segtitle>
|
---|
309 |
|
---|
310 | <seglistitem>
|
---|
311 | <seg>
|
---|
312 | clusterdb, createdb, createuser, dropdb,
|
---|
313 | dropuser, ecpg, initdb, pg_archivecleanup, pg_basebackup, pg_config,
|
---|
314 | pg_controldata, pg_ctl, pg_dump, pg_dumpall, pg_isready,
|
---|
315 | pg_receivewal, pg_recvlogical, pg_resetwval, pg_restore, pg_rewind,
|
---|
316 | pg_test_fsync, pg_test_timing, pg_upgrade, pg_waldump, pgbench,
|
---|
317 | postgres, postmaster (deprecated), psql, reindexdb, vacuumdb,
|
---|
318 | optionally, if Tcl support has been built, pltcl_delmod,
|
---|
319 | pltcl_listmod, pltcl_loadmod, and optionally (in contrib/) oid2name,
|
---|
320 | pg_standby, vacuumlo, and many others
|
---|
321 |
|
---|
322 | </seg>
|
---|
323 | <seg>
|
---|
324 | libecpg.{so,a}, libecpg_compat.{so,a}, libpgcommon.a, libpgport.a,
|
---|
325 | libpgtypes.{so,a}, libpq.{so,a}, various charset modules, and
|
---|
326 | optionally programming language modules under /usr/lib/postgresql
|
---|
327 | </seg>
|
---|
328 | <seg>
|
---|
329 | /usr/include/{libpq,postgresql},
|
---|
330 | /usr/lib/postgresql,
|
---|
331 | /usr/share/{doc/postgresql-&postgresql-version;,postgresql}, and
|
---|
332 | /srv/pgsql
|
---|
333 | </seg>
|
---|
334 | </seglistitem>
|
---|
335 | </segmentedlist>
|
---|
336 |
|
---|
337 | <variablelist>
|
---|
338 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
339 | <?dbfo list-presentation="list"?>
|
---|
340 | <?dbhtml list-presentation="table"?>
|
---|
341 |
|
---|
342 | <varlistentry id="clusterdb">
|
---|
343 | <term><command>clusterdb</command></term>
|
---|
344 | <listitem>
|
---|
345 | <para>is a utility for reclustering tables in a
|
---|
346 | <application>PostgreSQL</application> database.</para>
|
---|
347 | <indexterm zone="postgresql clusterdb">
|
---|
348 | <primary sortas="b-clusterdb">clusterdb</primary>
|
---|
349 | </indexterm>
|
---|
350 | </listitem>
|
---|
351 | </varlistentry>
|
---|
352 |
|
---|
353 | <varlistentry id="createdb">
|
---|
354 | <term><command>createdb</command></term>
|
---|
355 | <listitem>
|
---|
356 | <para> creates a new <application>PostgreSQL</application>
|
---|
357 | database.</para>
|
---|
358 | <indexterm zone="postgresql createdb">
|
---|
359 | <primary sortas="b-createdb">createdb</primary>
|
---|
360 | </indexterm>
|
---|
361 | </listitem>
|
---|
362 | </varlistentry>
|
---|
363 |
|
---|
364 | <!-- <varlistentry id="createlang">
|
---|
365 | <term><command>createlang</command></term>
|
---|
366 | <listitem>
|
---|
367 | <para>defines a new <application>PostgreSQL</application> procedural
|
---|
368 | language.</para>
|
---|
369 | <indexterm zone="postgresql createlang">
|
---|
370 | <primary sortas="b-createlang">createlang</primary>
|
---|
371 | </indexterm>
|
---|
372 | </listitem>
|
---|
373 | </varlistentry>-->
|
---|
374 |
|
---|
375 | <varlistentry id="createuser">
|
---|
376 | <term><command>createuser</command></term>
|
---|
377 | <listitem>
|
---|
378 | <para>defines a new <application>PostgreSQL</application>
|
---|
379 | user account.</para>
|
---|
380 | <indexterm zone="postgresql createuser">
|
---|
381 | <primary sortas="b-createuser">createuser</primary>
|
---|
382 | </indexterm>
|
---|
383 | </listitem>
|
---|
384 | </varlistentry>
|
---|
385 |
|
---|
386 | <varlistentry id="dropdb">
|
---|
387 | <term><command>dropdb</command></term>
|
---|
388 | <listitem>
|
---|
389 | <para>removes a <application>PostgreSQL</application> database.</para>
|
---|
390 | <indexterm zone="postgresql dropdb">
|
---|
391 | <primary sortas="b-dropdb">dropdb</primary>
|
---|
392 | </indexterm>
|
---|
393 | </listitem>
|
---|
394 | </varlistentry>
|
---|
395 |
|
---|
396 | <!-- <varlistentry id="droplang">
|
---|
397 | <term><command>droplang</command></term>
|
---|
398 | <listitem>
|
---|
399 | <para>removes a <application>PostgreSQL</application> procedural
|
---|
400 | language.</para>
|
---|
401 | <indexterm zone="postgresql droplang">
|
---|
402 | <primary sortas="b-droplang">droplang</primary>
|
---|
403 | </indexterm>
|
---|
404 | </listitem>
|
---|
405 | </varlistentry> -->
|
---|
406 |
|
---|
407 | <varlistentry id="dropuser">
|
---|
408 | <term><command>dropuser</command></term>
|
---|
409 | <listitem>
|
---|
410 | <para>removes a <application>PostgreSQL</application>
|
---|
411 | user account.</para>
|
---|
412 | <indexterm zone="postgresql dropuser">
|
---|
413 | <primary sortas="b-dropuser">dropuser</primary>
|
---|
414 | </indexterm>
|
---|
415 | </listitem>
|
---|
416 | </varlistentry>
|
---|
417 |
|
---|
418 | <varlistentry id="ecpg">
|
---|
419 | <term><command>ecpg</command></term>
|
---|
420 | <listitem>
|
---|
421 | <para>is the embedded SQL preprocessor.</para>
|
---|
422 | <indexterm zone="postgresql ecpg">
|
---|
423 | <primary sortas="b-ecpg">ecpg</primary>
|
---|
424 | </indexterm>
|
---|
425 | </listitem>
|
---|
426 | </varlistentry>
|
---|
427 |
|
---|
428 | <varlistentry id="initdb">
|
---|
429 | <term><command>initdb</command></term>
|
---|
430 | <listitem>
|
---|
431 | <para>creates a new database cluster.</para>
|
---|
432 | <indexterm zone="postgresql initdb">
|
---|
433 | <primary sortas="b-initdb">initdb</primary>
|
---|
434 | </indexterm>
|
---|
435 | </listitem>
|
---|
436 | </varlistentry>
|
---|
437 |
|
---|
438 | <varlistentry id="oid2name">
|
---|
439 | <term><command>oid2name</command></term>
|
---|
440 | <listitem>
|
---|
441 | <para>resolves OIDs (Object IDs) and file nodes in a PostgreSQL data
|
---|
442 | directory.</para>
|
---|
443 | <indexterm zone="postgresql oid2name">
|
---|
444 | <primary sortas="b-oid2name">oid2name</primary>
|
---|
445 | </indexterm>
|
---|
446 | </listitem>
|
---|
447 | </varlistentry>
|
---|
448 |
|
---|
449 | <varlistentry id="pg_archivecleanup">
|
---|
450 | <term><command>pg_archivecleanup</command></term>
|
---|
451 | <listitem>
|
---|
452 | <para>cleans up PostgreSQL WAL (write-ahead log) archive files.</para>
|
---|
453 | <indexterm zone="postgresql pg_archivecleanup">
|
---|
454 | <primary sortas="b-pg_archivecleanup">pg_archivecleanup</primary>
|
---|
455 | </indexterm>
|
---|
456 | </listitem>
|
---|
457 | </varlistentry>
|
---|
458 |
|
---|
459 | <varlistentry id="pg_basebackup">
|
---|
460 | <term><command>pg_basebackup</command></term>
|
---|
461 | <listitem>
|
---|
462 | <para>takes base backups of a running
|
---|
463 | <application>PostgreSQL</application> cluster.</para>
|
---|
464 | <indexterm zone="postgresql pg_basebackup">
|
---|
465 | <primary sortas="b-pg_basebackup">pg_basebackup</primary>
|
---|
466 | </indexterm>
|
---|
467 | </listitem>
|
---|
468 | </varlistentry>
|
---|
469 |
|
---|
470 | <varlistentry id="pg_config">
|
---|
471 | <term><command>pg_config</command></term>
|
---|
472 | <listitem>
|
---|
473 | <para>retrieves <application>PostgreSQL</application> version
|
---|
474 | information.</para>
|
---|
475 | <indexterm zone="postgresql pg_config">
|
---|
476 | <primary sortas="b-pg_config">pg_config</primary>
|
---|
477 | </indexterm>
|
---|
478 | </listitem>
|
---|
479 | </varlistentry>
|
---|
480 |
|
---|
481 | <varlistentry id="pg_controldata">
|
---|
482 | <term><command>pg_controldata</command></term>
|
---|
483 | <listitem>
|
---|
484 | <para>returns information initialized during
|
---|
485 | <command>initdb</command>, such as the catalog version and server
|
---|
486 | locale.</para>
|
---|
487 | <indexterm zone="postgresql pg_controldata">
|
---|
488 | <primary sortas="b-pg_controldata">pg_controldata</primary>
|
---|
489 | </indexterm>
|
---|
490 | </listitem>
|
---|
491 | </varlistentry>
|
---|
492 |
|
---|
493 | <varlistentry id="pg_ctl">
|
---|
494 | <term><command>pg_ctl</command></term>
|
---|
495 | <listitem>
|
---|
496 | <para>controls stopping and starting the database server.</para>
|
---|
497 | <indexterm zone="postgresql pg_ctl">
|
---|
498 | <primary sortas="b-pg_ctl">pg_ctl</primary>
|
---|
499 | </indexterm>
|
---|
500 | </listitem>
|
---|
501 | </varlistentry>
|
---|
502 |
|
---|
503 | <varlistentry id="pg_dump">
|
---|
504 | <term><command>pg_dump</command></term>
|
---|
505 | <listitem>
|
---|
506 | <para>dumps database data and metadata into scripts which are used
|
---|
507 | to recreate the database.</para>
|
---|
508 | <indexterm zone="postgresql pg_dump">
|
---|
509 | <primary sortas="b-pg_dump">pg_dump</primary>
|
---|
510 | </indexterm>
|
---|
511 | </listitem>
|
---|
512 | </varlistentry>
|
---|
513 |
|
---|
514 | <varlistentry id="pg_dumpall">
|
---|
515 | <term><command>pg_dumpall</command></term>
|
---|
516 | <listitem>
|
---|
517 | <para>recursively calls <command>pg_dump</command> for each
|
---|
518 | database in a cluster.</para>
|
---|
519 | <indexterm zone="postgresql pg_dumpall">
|
---|
520 | <primary sortas="b-pg_dumpall">pg_dumpall</primary>
|
---|
521 | </indexterm>
|
---|
522 | </listitem>
|
---|
523 | </varlistentry>
|
---|
524 |
|
---|
525 | <varlistentry id="pg_isready">
|
---|
526 | <term><command>pg_isready</command></term>
|
---|
527 | <listitem>
|
---|
528 | <para>check the connection status of a PostgreSQL server.</para>
|
---|
529 | <indexterm zone="postgresql pg_isready">
|
---|
530 | <primary sortas="b-pg_isready">pg_isready</primary>
|
---|
531 | </indexterm>
|
---|
532 | </listitem>
|
---|
533 | </varlistentry>
|
---|
534 |
|
---|
535 | <varlistentry id="pg_receivewal">
|
---|
536 | <term><command>pg_receivewal</command></term>
|
---|
537 | <listitem>
|
---|
538 | <para>
|
---|
539 | is used to stream write-ahead logs from a PostgreSQL server.
|
---|
540 | </para>
|
---|
541 | <indexterm zone="postgresql pg_receivewal">
|
---|
542 | <primary sortas="b-pg_receivewal">pg_receivewal</primary>
|
---|
543 | </indexterm>
|
---|
544 | </listitem>
|
---|
545 | </varlistentry>
|
---|
546 |
|
---|
547 | <varlistentry id="pg_recvlogical">
|
---|
548 | <term><command>pg_recvlogical</command></term>
|
---|
549 | <listitem>
|
---|
550 | <para>controls PostgreSQL logical decoding streams.</para>
|
---|
551 | <indexterm zone="postgresql pg_recvlogical">
|
---|
552 | <primary sortas="b-pg_recvlogical">pg_recvlogical</primary>
|
---|
553 | </indexterm>
|
---|
554 | </listitem>
|
---|
555 | </varlistentry>
|
---|
556 |
|
---|
557 | <varlistentry id="pg_resetwal">
|
---|
558 | <term><command>pg_resetwal</command></term>
|
---|
559 | <listitem>
|
---|
560 | <para>resets the write-ahead log and other control information
|
---|
561 | of a PostgreSQL database cluseter.</para>
|
---|
562 | <indexterm zone="postgresql pg_resetwal">
|
---|
563 | <primary sortas="b-pg_resetwal">pg_resetwal</primary>
|
---|
564 | </indexterm>
|
---|
565 | </listitem>
|
---|
566 | </varlistentry>
|
---|
567 |
|
---|
568 | <varlistentry id="pg_restore">
|
---|
569 | <term><command>pg_restore</command></term>
|
---|
570 | <listitem>
|
---|
571 | <para>creates databases from dump files created by
|
---|
572 | <command>pg_dump</command>.</para>
|
---|
573 | <indexterm zone="postgresql pg_restore">
|
---|
574 | <primary sortas="b-pg_restore">pg_restore</primary>
|
---|
575 | </indexterm>
|
---|
576 | </listitem>
|
---|
577 | </varlistentry>
|
---|
578 |
|
---|
579 | <varlistentry id="pg_rewind">
|
---|
580 | <term><command>pg_rewind</command></term>
|
---|
581 | <listitem>
|
---|
582 | <para>synchronizes a PostgreSQL data directory with another data
|
---|
583 | directory that was forked from the first one.</para>
|
---|
584 | <indexterm zone="postgresql pg_rewind">
|
---|
585 | <primary sortas="b-pg_rewind">pg_rewind</primary>
|
---|
586 | </indexterm>
|
---|
587 | </listitem>
|
---|
588 | </varlistentry>
|
---|
589 |
|
---|
590 | <varlistentry id="pg_standby">
|
---|
591 | <term><command>pg_standby</command></term>
|
---|
592 | <listitem>
|
---|
593 | <para>supports the creation of a PostgreSQL warm standby
|
---|
594 | server.</para>
|
---|
595 | <indexterm zone="postgresql pg_standby">
|
---|
596 | <primary sortas="b-pg_standby">pg_standby</primary>
|
---|
597 | </indexterm>
|
---|
598 | </listitem>
|
---|
599 | </varlistentry>
|
---|
600 |
|
---|
601 | <varlistentry id="pg_test_fsync">
|
---|
602 | <term><command>pg_test_fsync</command></term>
|
---|
603 | <listitem>
|
---|
604 | <para>determine fastest wal_sync method for PostgreSQL.</para>
|
---|
605 | <indexterm zone="postgresql pg_test_fsync">
|
---|
606 | <primary sortas="b-pg_test_fsync">pg_test_fsync</primary>
|
---|
607 | </indexterm>
|
---|
608 | </listitem>
|
---|
609 | </varlistentry>
|
---|
610 |
|
---|
611 | <varlistentry id="pg_test_timing">
|
---|
612 | <term><command>pg_test_timing</command></term>
|
---|
613 | <listitem>
|
---|
614 | <para>measure timing overhead.</para>
|
---|
615 | <indexterm zone="postgresql pg_test_timing">
|
---|
616 | <primary sortas="b-pg_test_timing">pg_test_timing</primary>
|
---|
617 | </indexterm>
|
---|
618 | </listitem>
|
---|
619 | </varlistentry>
|
---|
620 |
|
---|
621 | <varlistentry id="pg_upgrade">
|
---|
622 | <term><command>pg_upgrade</command></term>
|
---|
623 | <listitem>
|
---|
624 | <para>upgrade a PostgreSQL server instance.</para>
|
---|
625 | <indexterm zone="postgresql pg_upgrade">
|
---|
626 | <primary sortas="b-pg_upgrade">pg_upgrade</primary>
|
---|
627 | </indexterm>
|
---|
628 | </listitem>
|
---|
629 | </varlistentry>
|
---|
630 |
|
---|
631 | <varlistentry id="pg_waldump">
|
---|
632 | <term><command>pg_waldump</command></term>
|
---|
633 | <listitem>
|
---|
634 | <para>display a human-readable rendering of the write-ahead log of a
|
---|
635 | PostgreSQL database cluster.</para>
|
---|
636 | <indexterm zone="postgresql pg_waldump">
|
---|
637 | <primary sortas="b-pg_waldump">pg_waldump</primary>
|
---|
638 | </indexterm>
|
---|
639 | </listitem>
|
---|
640 | </varlistentry>
|
---|
641 |
|
---|
642 | <varlistentry id="pgbench">
|
---|
643 | <term><command>pgbench</command></term>
|
---|
644 | <listitem>
|
---|
645 | <para>run a benchmark test on PostgreSQL.</para>
|
---|
646 | <indexterm zone="postgresql pgbench">
|
---|
647 | <primary sortas="b-pgbench">pgbench</primary>
|
---|
648 | </indexterm>
|
---|
649 | </listitem>
|
---|
650 | </varlistentry>
|
---|
651 |
|
---|
652 | <varlistentry id="pltcl_delmod">
|
---|
653 | <term><command>pltcl_delmod</command></term>
|
---|
654 | <listitem>
|
---|
655 | <para>is a support script used to delete a module from a
|
---|
656 | PL/<application>Tcl</application> table. The command
|
---|
657 | requires the <ulink
|
---|
658 | url="http://flightaware.github.io/Pgtcl/">Pgtcl</ulink>
|
---|
659 | package to be installed also.</para>
|
---|
660 | <indexterm zone="postgresql pltcl_delmod">
|
---|
661 | <primary sortas="b-pltcl_delmod">pltcl_delmod</primary>
|
---|
662 | </indexterm>
|
---|
663 | </listitem>
|
---|
664 | </varlistentry>
|
---|
665 |
|
---|
666 | <varlistentry id="pltcl_listmod">
|
---|
667 | <term><command>pltcl_listmod</command></term>
|
---|
668 | <listitem>
|
---|
669 | <para>is a support script used to list the modules in a
|
---|
670 | PL/<application>Tcl</application> table. The command
|
---|
671 | requires the <ulink
|
---|
672 | url="http://gborg.postgresql.org/project/pgtcl/">Pgtcl</ulink>
|
---|
673 | package to be installed also.</para>
|
---|
674 | <indexterm zone="postgresql pltcl_listmod">
|
---|
675 | <primary sortas="b-pltcl_listmod">pltcl_listmod</primary>
|
---|
676 | </indexterm>
|
---|
677 | </listitem>
|
---|
678 | </varlistentry>
|
---|
679 |
|
---|
680 | <varlistentry id="pltcl_loadmod">
|
---|
681 | <term><command>pltcl_loadmod</command></term>
|
---|
682 | <listitem>
|
---|
683 | <para>is a support script used to load a module into a
|
---|
684 | PL/<application>Tcl</application> table. The command
|
---|
685 | requires the <ulink
|
---|
686 | url="http://gborg.postgresql.org/project/pgtcl/">Pgtcl</ulink>
|
---|
687 | package to be installed also.</para>
|
---|
688 | <indexterm zone="postgresql pltcl_loadmod">
|
---|
689 | <primary sortas="b-pltcl_loadmod">pltcl_loadmod</primary>
|
---|
690 | </indexterm>
|
---|
691 | </listitem>
|
---|
692 | </varlistentry>
|
---|
693 |
|
---|
694 | <varlistentry id="postgres">
|
---|
695 | <term><command>postgres</command></term>
|
---|
696 | <listitem>
|
---|
697 | <para>is the PostgreSQL database server.</para>
|
---|
698 | <indexterm zone="postgresql postgres">
|
---|
699 | <primary sortas="b-postgres">postgres</primary>
|
---|
700 | </indexterm>
|
---|
701 | </listitem>
|
---|
702 | </varlistentry>
|
---|
703 |
|
---|
704 | <varlistentry id="postmaster">
|
---|
705 | <term><command>postmaster</command></term>
|
---|
706 | <listitem>
|
---|
707 | <para>(deprecated, a symlink to <command>postgres</command>) is a
|
---|
708 | multi-user database daemon.</para>
|
---|
709 | <indexterm zone="postgresql postmaster">
|
---|
710 | <primary sortas="b-postmaster">postmaster</primary>
|
---|
711 | </indexterm>
|
---|
712 | </listitem>
|
---|
713 | </varlistentry>
|
---|
714 |
|
---|
715 | <varlistentry id="psql">
|
---|
716 | <term><command>psql</command></term>
|
---|
717 | <listitem>
|
---|
718 | <para>is a console based database shell.</para>
|
---|
719 | <indexterm zone="postgresql psql">
|
---|
720 | <primary sortas="b-psql">psql</primary>
|
---|
721 | </indexterm>
|
---|
722 | </listitem>
|
---|
723 | </varlistentry>
|
---|
724 |
|
---|
725 | <varlistentry id="reindexdb">
|
---|
726 | <term><command>reindexdb</command></term>
|
---|
727 | <listitem>
|
---|
728 | <para>is a utility for rebuilding indexes in a database.</para>
|
---|
729 | <indexterm zone="postgresql reindexdb">
|
---|
730 | <primary sortas="b-reindexdb">reindexdb</primary>
|
---|
731 | </indexterm>
|
---|
732 | </listitem>
|
---|
733 | </varlistentry>
|
---|
734 |
|
---|
735 | <varlistentry id="vacuumdb">
|
---|
736 | <term><command>vacuumdb</command></term>
|
---|
737 | <listitem>
|
---|
738 | <para>compacts databases and generates statistics for the query
|
---|
739 | analyzer.</para>
|
---|
740 | <indexterm zone="postgresql vacuumdb">
|
---|
741 | <primary sortas="b-vacuumdb">vacuumdb</primary>
|
---|
742 | </indexterm>
|
---|
743 | </listitem>
|
---|
744 | </varlistentry>
|
---|
745 |
|
---|
746 | <varlistentry id="vacuumlo">
|
---|
747 | <term><command>vacuumlo</command></term>
|
---|
748 | <listitem>
|
---|
749 | <para>remove orphaned large objects from a PostgreSQL database.</para>
|
---|
750 | <indexterm zone="postgresql vacuumlo">
|
---|
751 | <primary sortas="b-vacuumlo">vacuumlo</primary>
|
---|
752 | </indexterm>
|
---|
753 | </listitem>
|
---|
754 | </varlistentry>
|
---|
755 |
|
---|
756 | <varlistentry id="libecpg">
|
---|
757 | <term><filename class='libraryfile'>libecpg.{so,a}</filename></term>
|
---|
758 | <listitem>
|
---|
759 | <para>contains functions to support embedded SQL in C programs.</para>
|
---|
760 | <indexterm zone="postgresql libecpg">
|
---|
761 | <primary sortas="c-libecpg">libecpg.{so,a}</primary>
|
---|
762 | </indexterm>
|
---|
763 | </listitem>
|
---|
764 | </varlistentry>
|
---|
765 |
|
---|
766 | <varlistentry id="libecpg_compat">
|
---|
767 | <term><filename class='libraryfile'>libecpg_compat.{so,a}</filename></term>
|
---|
768 | <listitem>
|
---|
769 | <para>is the ecpg compatibility library.</para>
|
---|
770 | <indexterm zone="postgresql libecpg_compat">
|
---|
771 | <primary sortas="c-libecpg_compat">libecpg_compat.{so,a}</primary>
|
---|
772 | </indexterm>
|
---|
773 | </listitem>
|
---|
774 | </varlistentry>
|
---|
775 |
|
---|
776 | <varlistentry id="libgport">
|
---|
777 | <term><filename class='libraryfile'>libgport.a</filename></term>
|
---|
778 | <listitem>
|
---|
779 | <para>is the port-specific subsystem of the Postgres backend.</para>
|
---|
780 | <indexterm zone="postgresql libgport">
|
---|
781 | <primary sortas="c-libgport">libgport.a</primary>
|
---|
782 | </indexterm>
|
---|
783 | </listitem>
|
---|
784 | </varlistentry>
|
---|
785 |
|
---|
786 | <varlistentry id="libpgtypes">
|
---|
787 | <term><filename class='libraryfile'>libpgtypes.{so,a}</filename></term>
|
---|
788 | <listitem>
|
---|
789 | <para>contains functions for dealing with Postgres data types.</para>
|
---|
790 | <indexterm zone="postgresql libpgtypes">
|
---|
791 | <primary sortas="c-libpgtypes">libpgtypes.{so,a}</primary>
|
---|
792 | </indexterm>
|
---|
793 | </listitem>
|
---|
794 | </varlistentry>
|
---|
795 |
|
---|
796 | <varlistentry id="libpq">
|
---|
797 | <term><filename class='libraryfile'>libpq.{so,a}</filename></term>
|
---|
798 | <listitem>
|
---|
799 | <para>is the C programmer's API to Postgres.</para>
|
---|
800 | <indexterm zone="postgresql libpq">
|
---|
801 | <primary sortas="c-libpq">libpq.{so,a}</primary>
|
---|
802 | </indexterm>
|
---|
803 | </listitem>
|
---|
804 | </varlistentry>
|
---|
805 |
|
---|
806 | </variablelist>
|
---|
807 |
|
---|
808 | </sect2>
|
---|
809 |
|
---|
810 | </sect1>
|
---|