source: server/databases/postgresql.xml

trunk
Last change on this file was e8b3f50, checked in by Douglas R. Reno <renodr@…>, 2 months ago

Tags

  • Property mode set to 100644
File size: 35.2 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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 "https://ftp.postgresql.org/pub/source/v&postgresql-version;/postgresql-&postgresql-version;.tar.bz2">
8 <!ENTITY postgresql-download-ftp " ">
9 <!ENTITY postgresql-md5sum "3d19d93434666db5d33e692472915ae5">
10 <!ENTITY postgresql-size "24 MB">
11 <!ENTITY postgresql-buildsize "227 MB (add 43 MB for tests)">
12 <!ENTITY postgresql-time "0.8 SBU (with parallelism=4, add 0.2 SBU for tests)">
13]>
14
15<sect1 id="postgresql" xreflabel="PostgreSQL-&postgresql-version;">
16 <?dbhtml filename="postgresql.html"?>
17
18
19 <title>PostgreSQL-&postgresql-version;</title>
20
21 <indexterm zone="postgresql">
22 <primary sortas="a-PostgreSQL">PostgreSQL</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to PostgreSQL</title>
27
28 <para>
29 <application>PostgreSQL</application> is an advanced
30 object-relational database management system (ORDBMS), derived
31 from the Berkeley Postgres database management system.
32 </para>
33
34 &lfs121_checked;
35
36 <bridgehead renderas="sect3">Package Information</bridgehead>
37 <itemizedlist spacing="compact">
38 <listitem>
39 <para>
40 Download (HTTP): <ulink url="&postgresql-download-http;"/>
41 </para>
42 </listitem>
43 <listitem>
44 <para>
45 Download (FTP): <ulink url="&postgresql-download-ftp;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download MD5 sum: &postgresql-md5sum;
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download size: &postgresql-size;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Estimated disk space required: &postgresql-buildsize;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated build time: &postgresql-time;
66 </para>
67 </listitem>
68 </itemizedlist>
69
70 <bridgehead renderas="sect3">PostgreSQL Dependencies</bridgehead>
71
72 <bridgehead renderas="sect4">Optional</bridgehead>
73 <para role="optional">
74 <xref linkend="icu"/>,
75 <xref linkend="libxml2"/>,
76 <xref linkend="libxslt"/>,
77 <xref linkend="openldap"/>,
78 <xref linkend="linux-pam"/>,
79 <xref linkend="mitkrb"/> and
80 <ulink url="https://developer.apple.com/bonjour/">Bonjour</ulink>
81 </para>
82
83 <bridgehead renderas="sect4">Optional (To Regenerate Documentation)</bridgehead>
84 <para role="optional">
85 <xref linkend="fop"/>,
86 <xref linkend="sgml-dtd"/>,
87 <xref linkend="docbook-dsssl"/>,
88 <xref linkend="docbook-utils"/>,
89 <xref linkend="openjade"/>, and
90 <xref linkend="perl-sgmlspm"/>
91 </para>
92
93 <para condition="html" role="usernotes">Editor Notes:
94 <ulink url="&blfs-wiki;/postgresql"/></para>
95
96 </sect2>
97
98 <sect2 role="installation">
99 <title>Installation of PostgreSQL</title>
100
101 <para>
102 For enhanced security, it is better to have a dedicated group and user
103 for running the PostgreSQL server. First, issue as the
104 <systemitem class="username">root</systemitem> user:
105 </para>
106
107<screen role="root"><userinput>groupadd -g 41 postgres &amp;&amp;
108useradd -c "PostgreSQL Server" -g postgres -d /srv/pgsql/data \
109 -u 41 postgres</userinput></screen>
110
111 <note>
112 <para>
113 There are several configuration items that add additional
114 functionality with optional packages to
115 <application>PostgreSQL</application>. Use <command>./configure
116 --help</command> to see a list.
117 </para>
118 </note>
119
120 <para>
121 Install <application>PostgreSQL</application> with the
122 following commands:
123 </para>
124
125<screen><userinput>sed -i '/DEFAULT_PGSOCKET_DIR/s@/tmp@/run/postgresql@' src/include/pg_config_manual.h &amp;&amp;
126
127./configure --prefix=/usr \
128 --enable-thread-safety \
129 --docdir=/usr/share/doc/postgresql-&postgresql-version; &amp;&amp;
130make</userinput></screen>
131
132 <para>
133 There are a number of programs in the
134 <filename class="directory">contrib/</filename> directory. If you are
135 going to run this installation as a server and wish to build some of
136 them, enter <command>make -C contrib</command> or <command>make -C
137 contrib/<replaceable>&lt;SUBDIR-NAME&gt;</replaceable></command> for
138 each subdirectory.
139 </para>
140
141 <para>
142 Tests must be run as an unprivileged user because they need to start a
143 temporary server and this is prevented as the root user. For the same
144 reason, you need to stop all PostgreSQL servers if any are running. If a
145 previous version of PostgreSQL is installed, it may be necessary to use
146 <command>--disable-rpath</command> with <command>configure</command> to
147 avoid failures, but <emphasis>installing the binaries created using this
148 switch is not recommended</emphasis>. To test the results, issue:
149 <command>make check</command>.
150 </para>
151
152 <note>
153 <para>If you are installing <application>PostgreSQL</application> to
154 upgrade an existing installation, there are important steps that you need
155 to follow. If the major version of the new build is greater than the
156 previous version, there is a chance that the data file format has changed.
157 new software cannot act on the existing data files. In this case, the
158 server will not start because the old programs have been overwritten, so
159 the data is unavailable until it's file format has been converted.</para>
160
161 <para>
162 Before upgrading an existing installation of PostgreSQL, check
163 the documentation for any considerations that you must keep in mind
164 during the upgrade. Note that new major versions might use a different
165 binary format in the data objects, causing potential incompatibilities.
166 For more information, check out upstream's documentation about
167 upgrading PostgreSQL here.
168 <ulink url="https://www.postgresql.org/docs/current/upgrading.html"/>.
169 </para>
170
171 <para>At this point, you may have both the old and the new binaries
172 installed on your filesystem. These binaries can be used to perform an
173 upgrade of your existing database files. For the following instructions
174 it is assumed that
175 <itemizedlist>
176 <listitem><para>The actual data files are stored in
177 <filename class="directory">/srv/pgsql/data</filename></para>
178 </listitem>
179 <listitem><para>The upgraded data files will be stored in
180 <filename class="directory">/srv/pgsql/newdata</filename></para>
181 </listitem>
182 <listitem><para>There is enough disk space to hold the actual
183 data files twice. The upgrade is not an inline upgrade but
184 it will copy the data to new database files.</para>
185 </listitem>
186 </itemizedlist>
187 </para>
188
189 <para>First, do a temporary install which makes access to the new
190 binaries much easier:</para>
191<screen role="nodump"><userinput>make DESTDIR=$(pwd)/DESTDIR install</userinput></screen>
192
193 <para>Next, create a directory which is writable by the
194 <systemitem class="username">postgres</systemitem> user, as the
195 <systemitem class="username">root</systemitem> user:</para>
196
197<screen role="nodump"><userinput>install -d -o postgres $(pwd)/DESTDIR/tmp</userinput></screen>
198
199 <para>Now, stop the existing instance of <application>PostgreSQL</application>
200 and start the upgrade process as the
201 <systemitem class="username">root</systemitem> user:</para>
202
203<screen revision="sysv" role="nodump"><userinput>pushd $(pwd)/DESTDIR/tmp
204/etc/rc.d/init.d/postgresql stop
205su postgres -c "../usr/bin/initdb -D /srv/pgsql/newdata"
206su postgres -c "../usr/bin/pg_upgrade \
207 -d /srv/pgsql/data -b /usr/bin \
208 -D /srv/pgsql/newdata -B ../usr/bin"
209popd</userinput></screen>
210
211<screen revision="systemd" role="nodump"><userinput>pushd $(pwd)/DESTDIR/tmp
212systemctl stop postgresql
213su postgres -c "../usr/bin/initdb -D /srv/pgsql/newdata"
214su postgres -c "../usr/bin/pg_upgrade \
215 -d /srv/pgsql/data -b /usr/bin \
216 -D /srv/pgsql/newdata -B ../usr/bin"
217popd</userinput></screen>
218
219 <para>At this point, your database files are available in two locations on
220 disk. The old data is located in
221 <filename class="directory">/srv/pgsql/data</filename>, and the new data
222 is in <filename class="directory">/srv/pgsql/newdata</filename>.
223 Backing up the old database files is suggested before continuing.</para>
224
225 <para>Next, remove the old database files, and rename the new data
226 directory as the <systemitem class="username">root</systemitem> user:</para>
227
228<screen role="nodump"><userinput>rm -rf /srv/pgsql/data
229mv /srv/pgsql/newdata /srv/pgsql/data</userinput></screen>
230
231 </note>
232
233 <para>
234 Now, as the <systemitem class="username">root</systemitem> user:
235 </para>
236
237<screen role="root"><userinput>make install &amp;&amp;
238make install-docs</userinput></screen>
239
240 <para>
241 If you made any of the <filename class="directory">contrib/</filename>
242 programs, as the <systemitem class="username">root</systemitem> user:
243 </para>
244
245<screen role="nodump"><userinput>make -C contrib/<replaceable>&lt;SUBDIR-NAME&gt;</replaceable> install</userinput></screen>
246
247 <tip>
248 <para>
249 If you only intend to use <application>PostgreSQL</application> as a
250 client to connect to a server on another machine, your installation is
251 complete and you should not run the remaining commands.
252 </para>
253 </tip>
254
255 <para>
256 If you have upgraded an existing database, skip the rest of the
257 commands because your database is ready to use. If this is the
258 first time you install <application>PostgreSQL</application>,
259 continue with the initialization.
260 </para>
261
262 <para>
263 Initialize a database cluster with the following commands issued by the
264 <systemitem class="username">root</systemitem> user:
265 </para>
266
267<screen role="root"><userinput>install -v -dm700 /srv/pgsql/data &amp;&amp;
268install -v -dm755 /run/postgresql &amp;&amp;
269chown -Rv postgres:postgres /srv/pgsql /run/postgresql</userinput></screen>
270
271 <para>
272 Now, initialize the database as the <systemitem
273 class="username">root</systemitem> user:
274 </para>
275
276<screen role="root"><userinput>su - postgres -c '/usr/bin/initdb -D /srv/pgsql/data'</userinput></screen>
277
278 </sect2>
279
280 <sect2 role="commands">
281 <title>Command Explanations</title>
282
283 <para>
284 <command>sed -i ...</command>: This sed changes the server socket location
285 from <filename class="directory">/tmp</filename> to
286 <filename class="directory">/run/postgresql</filename>.
287 </para>
288
289 <para>
290 <parameter>--enable-thread-safety</parameter>: This switch makes the
291 client libraries thread-safe by allowing concurrent threads in
292 <filename class="libraryfile">libpq</filename> and ECPG programs to
293 safely control their private connection handles.
294 </para>
295
296 <para>
297 <option>--with-openssl</option>: builds the package with support for
298 <application>OpenSSL</application> encrypted connections.
299 </para>
300
301 <para>
302 <option>--with-perl</option>: builds the PL/Perl server-side language.
303 </para>
304
305 <para>
306 <option>--with-python</option>: builds the PL/Python server-side
307 language. Python3 is used by default, Python2 is no longer supported.
308 </para>
309
310 <para>
311 <option>--with-tcl</option>: builds the PL/Tcl server-side language.
312 </para>
313
314 </sect2>
315
316 <sect2 role="configuration">
317 <title>Configuring PostgreSQL</title>
318
319 <sect3 id="postgresql-config">
320 <title>Config Files</title>
321
322 <para>
323 <filename>$PGDATA/pg_ident.con</filename>,
324 <filename>$PGDATA/pg_hba.conf</filename>, and
325 <filename>$PGDATA/postgresql.conf</filename>
326 </para>
327
328 <indexterm zone="postgresql postgresql-config">
329 <primary sortas="e-A.PGDATA-pg_ident.con">$PGDATA/pg_indent.con</primary>
330 </indexterm>
331
332 <indexterm zone="postgresql postgresql-config">
333 <primary sortas="e-A.PGDATA-pg_hba.conf">$PGDATA/pg_hba_conf</primary>
334 </indexterm>
335
336 <indexterm zone="postgresql postgresql-config">
337 <primary sortas="e-A.PGDATA-postgresql.conf">$PGDATA/postgresql.conf</primary>
338 </indexterm>
339
340 <para>
341 The <envar>PGDATA</envar> environment variable is used to
342 distinguish database clusters from one another by setting it to
343 the value of the directory which contains the cluster desired.
344 The three configuration files exist in every <filename
345 class="directory">PGDATA/</filename> directory. Details on the
346 format of the files and the options that can be set in each can
347 be found in <filename>
348 /usr/share/doc/postgresql-&postgresql-version;/html/index.html</filename>.
349 </para>
350
351 </sect3>
352
353 <sect3 id="postgresql-init">
354 <title><phrase revision="sysv">Boot Script</phrase>
355 <phrase revision="systemd">Systemd Unit</phrase></title>
356
357 <para>
358 Install the
359 <phrase revision="sysv"><filename>/etc/rc.d/init.d/postgresql</filename>
360 init script</phrase>
361 <phrase revision="systemd"><filename>postgresql.service</filename>
362 unit</phrase> included in the
363 <xref linkend="bootscripts" revision="sysv"/>
364 <xref linkend="systemd-units" revision="systemd"/> package:
365 </para>
366
367 <indexterm zone="postgresql postgresql-init">
368 <primary sortas="f-postgresql">postgresql</primary>
369 </indexterm>
370
371<screen role="root"><userinput>make install-postgresql</userinput></screen>
372
373 </sect3>
374
375 <sect3>
376 <title>Starting the PostgreSQL Server and Creating a Sample Database</title>
377
378 <para>
379 The database server can be manually started with the following command
380 (as the <systemitem class="username">root</systemitem> user):
381 </para>
382
383<screen role="root"><userinput>su - postgres -c '/usr/bin/postgres -D /srv/pgsql/data > \
384 /srv/pgsql/data/logfile 2&gt;&amp;1 &amp;'</userinput></screen>
385 <note>
386 <para>
387 If you are scripting this part, you should wait for the server to
388 start before going on, by adding for example
389 <command>sleep 2</command> after the above command.
390 </para>
391 </note>
392
393 <para>
394 The instructions below show how to create a database, add a table to
395 it, insert some rows into the table and select them, to verify that the
396 installation is working properly. Still as user <systemitem
397 class="username">root</systemitem>, issue:
398 </para>
399
400<screen role="root"><userinput>su - postgres -c '/usr/bin/createdb test' &amp;&amp;
401echo "create table t1 ( name varchar(20), state_province varchar(20) );" \
402 | (su - postgres -c '/usr/bin/psql test ') &amp;&amp;
403echo "insert into t1 values ('Billy', 'NewYork');" \
404 | (su - postgres -c '/usr/bin/psql test ') &amp;&amp;
405echo "insert into t1 values ('Evanidus', 'Quebec');" \
406 | (su - postgres -c '/usr/bin/psql test ') &amp;&amp;
407echo "insert into t1 values ('Jesse', 'Ontario');" \
408 | (su - postgres -c '/usr/bin/psql test ') &amp;&amp;
409echo "select * from t1;" | (su - postgres -c '/usr/bin/psql test')</userinput></screen>
410
411 <para>
412 When you are done with testing, you can shut down the server, by
413 issuing as <systemitem class="username">root</systemitem>:
414 </para>
415
416<screen role="root"><userinput>su - postgres -c "/usr/bin/pg_ctl stop -D /srv/pgsql/data"</userinput></screen>
417
418 </sect3>
419
420 </sect2>
421
422 <sect2 role="content">
423 <title>Contents</title>
424
425 <segmentedlist>
426 <segtitle>Installed Programs</segtitle>
427 <segtitle>Installed Libraries</segtitle>
428 <segtitle>Installed Directories</segtitle>
429
430 <seglistitem>
431 <seg>
432 clusterdb, createdb, createuser, dropdb, dropuser,
433 ecpg, initdb, pg_amcheck, pg_archivecleanup, pg_basebackup,
434 pg_checksums,
435 pg_config, pg_controldata, pg_ctl, pg_dump, pg_dumpall, pg_isready,
436 pg_receivewal, pg_recvlogical, pg_resetwal, pg_restore, pg_rewind,
437 pg_test_fsync, pg_test_timing, pg_upgrade, pg_verifybackup,
438 pg_waldump, pgbench, postgres, psql, reindexdb, vacuumdb,
439 optionally, if Tcl support has been built, pltcl_delmod,
440 pltcl_listmod, pltcl_loadmod, and optionally (in contrib/) oid2name,
441 pg_standby, vacuumlo, and many others
442
443 </seg>
444 <seg>
445 libecpg.{so,a}, libecpg_compat.{so,a}, libpgcommon.a,
446 libpgcommon_shlib.a, libpgfeutils.a, libpgport.a, libpgport_shlib.a,
447 libpgtypes.{so,a}, libpq.{so,a}, various charset modules and
448 optionally programming language modules under /usr/lib/postgresql
449 </seg>
450 <seg>
451 /usr/include/{libpq,postgresql},
452 /usr/lib/postgresql,
453 /usr/share/{doc/postgresql-&postgresql-version;,postgresql}, and
454 /srv/pgsql
455 </seg>
456 </seglistitem>
457 </segmentedlist>
458
459 <variablelist>
460 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
461 <?dbfo list-presentation="list"?>
462 <?dbhtml list-presentation="table"?>
463
464 <varlistentry id="clusterdb">
465 <term><command>clusterdb</command></term>
466 <listitem>
467 <para>
468 is a utility for reclustering tables in a
469 <application>PostgreSQL</application> database
470 </para>
471 <indexterm zone="postgresql clusterdb">
472 <primary sortas="b-clusterdb">clusterdb</primary>
473 </indexterm>
474 </listitem>
475 </varlistentry>
476
477 <varlistentry id="createdb">
478 <term><command>createdb</command></term>
479 <listitem>
480 <para>
481 creates a new <application>PostgreSQL</application>
482 database
483 </para>
484 <indexterm zone="postgresql createdb">
485 <primary sortas="b-createdb">createdb</primary>
486 </indexterm>
487 </listitem>
488 </varlistentry>
489
490 <varlistentry id="createuser">
491 <term><command>createuser</command></term>
492 <listitem>
493 <para>
494 defines a new <application>PostgreSQL</application>
495 user account
496 </para>
497 <indexterm zone="postgresql createuser">
498 <primary sortas="b-createuser">createuser</primary>
499 </indexterm>
500 </listitem>
501 </varlistentry>
502
503 <varlistentry id="dropdb">
504 <term><command>dropdb</command></term>
505 <listitem>
506 <para>
507 removes a <application>PostgreSQL</application> database
508 </para>
509 <indexterm zone="postgresql dropdb">
510 <primary sortas="b-dropdb">dropdb</primary>
511 </indexterm>
512 </listitem>
513 </varlistentry>
514
515 <varlistentry id="dropuser">
516 <term><command>dropuser</command></term>
517 <listitem>
518 <para>
519 removes a <application>PostgreSQL</application> user account
520 </para>
521 <indexterm zone="postgresql dropuser">
522 <primary sortas="b-dropuser">dropuser</primary>
523 </indexterm>
524 </listitem>
525 </varlistentry>
526
527 <varlistentry id="ecpg">
528 <term><command>ecpg</command></term>
529 <listitem>
530 <para>
531 is the embedded SQL preprocessor
532 </para>
533 <indexterm zone="postgresql ecpg">
534 <primary sortas="b-ecpg">ecpg</primary>
535 </indexterm>
536 </listitem>
537 </varlistentry>
538
539 <varlistentry id="initdb">
540 <term><command>initdb</command></term>
541 <listitem>
542 <para>
543 creates a new database cluster
544 </para>
545 <indexterm zone="postgresql initdb">
546 <primary sortas="b-initdb">initdb</primary>
547 </indexterm>
548 </listitem>
549 </varlistentry>
550
551 <varlistentry id="oid2name">
552 <term><command>oid2name</command></term>
553 <listitem>
554 <para>
555 resolves OIDs (Object IDs) and file nodes in a PostgreSQL data
556 directory
557 </para>
558 <indexterm zone="postgresql oid2name">
559 <primary sortas="b-oid2name">oid2name</primary>
560 </indexterm>
561 </listitem>
562 </varlistentry>
563
564 <varlistentry id="pg_amcheck">
565 <term><command>pg_amcheck</command></term>
566 <listitem>
567 <para>
568 checks for corruption in one or more PostgreSQL databases
569 </para>
570 <indexterm zone="postgresql pg_amcheck">
571 <primary sortas="b-pg_amcheck">pg_amcheck</primary>
572 </indexterm>
573 </listitem>
574 </varlistentry>
575
576 <varlistentry id="pg_archivecleanup">
577 <term><command>pg_archivecleanup</command></term>
578 <listitem>
579 <para>
580 cleans up PostgreSQL WAL (write-ahead log) archive files
581 </para>
582 <indexterm zone="postgresql pg_archivecleanup">
583 <primary sortas="b-pg_archivecleanup">pg_archivecleanup</primary>
584 </indexterm>
585 </listitem>
586 </varlistentry>
587
588 <varlistentry id="pg_basebackup">
589 <term><command>pg_basebackup</command></term>
590 <listitem>
591 <para>
592 takes base backups of a running
593 <application>PostgreSQL</application> cluster
594 </para>
595 <indexterm zone="postgresql pg_basebackup">
596 <primary sortas="b-pg_basebackup">pg_basebackup</primary>
597 </indexterm>
598 </listitem>
599 </varlistentry>
600
601 <varlistentry id="pg_checksums">
602 <term><command>pg_checksums</command></term>
603 <listitem>
604 <para>
605 enables, disables, or checks data checksums in a
606 <application>PostgreSQL</application> database cluster
607 </para>
608 <indexterm zone="postgresql pg_checksums">
609 <primary sortas="b-pg_checksums">pg_checksums</primary>
610 </indexterm>
611 </listitem>
612 </varlistentry>
613
614 <varlistentry id="pg_config">
615 <term><command>pg_config</command></term>
616 <listitem>
617 <para>
618 retrieves <application>PostgreSQL</application> version
619 information
620 </para>
621 <indexterm zone="postgresql pg_config">
622 <primary sortas="b-pg_config">pg_config</primary>
623 </indexterm>
624 </listitem>
625 </varlistentry>
626
627 <varlistentry id="pg_controldata">
628 <term><command>pg_controldata</command></term>
629 <listitem>
630 <para>
631 returns information initialized during <command>initdb</command>,
632 such as the catalog version and server locale
633 </para>
634 <indexterm zone="postgresql pg_controldata">
635 <primary sortas="b-pg_controldata">pg_controldata</primary>
636 </indexterm>
637 </listitem>
638 </varlistentry>
639
640 <varlistentry id="pg_ctl">
641 <term><command>pg_ctl</command></term>
642 <listitem>
643 <para>
644 controls stopping and starting the database server
645 </para>
646 <indexterm zone="postgresql pg_ctl">
647 <primary sortas="b-pg_ctl">pg_ctl</primary>
648 </indexterm>
649 </listitem>
650 </varlistentry>
651
652 <varlistentry id="pg_dump">
653 <term><command>pg_dump</command></term>
654 <listitem>
655 <para>
656 dumps database data and metadata into scripts which are used
657 to recreate the database
658 </para>
659 <indexterm zone="postgresql pg_dump">
660 <primary sortas="b-pg_dump">pg_dump</primary>
661 </indexterm>
662 </listitem>
663 </varlistentry>
664
665 <varlistentry id="pg_dumpall">
666 <term><command>pg_dumpall</command></term>
667 <listitem>
668 <para>
669 recursively calls <command>pg_dump</command> for each
670 database in a cluster
671 </para>
672 <indexterm zone="postgresql pg_dumpall">
673 <primary sortas="b-pg_dumpall">pg_dumpall</primary>
674 </indexterm>
675 </listitem>
676 </varlistentry>
677
678 <varlistentry id="pg_isready">
679 <term><command>pg_isready</command></term>
680 <listitem>
681 <para>
682 checks the connection status of a PostgreSQL server
683 </para>
684 <indexterm zone="postgresql pg_isready">
685 <primary sortas="b-pg_isready">pg_isready</primary>
686 </indexterm>
687 </listitem>
688 </varlistentry>
689
690 <varlistentry id="pg_receivewal">
691 <term><command>pg_receivewal</command></term>
692 <listitem>
693 <para>
694 is used to stream write-ahead logs from a PostgreSQL server
695 </para>
696 <indexterm zone="postgresql pg_receivewal">
697 <primary sortas="b-pg_receivewal">pg_receivewal</primary>
698 </indexterm>
699 </listitem>
700 </varlistentry>
701
702 <varlistentry id="pg_recvlogical">
703 <term><command>pg_recvlogical</command></term>
704 <listitem>
705 <para>
706 controls PostgreSQL logical decoding streams
707 </para>
708 <indexterm zone="postgresql pg_recvlogical">
709 <primary sortas="b-pg_recvlogical">pg_recvlogical</primary>
710 </indexterm>
711 </listitem>
712 </varlistentry>
713
714 <varlistentry id="pg_resetwal">
715 <term><command>pg_resetwal</command></term>
716 <listitem>
717 <para>
718 resets the write-ahead log and other control information
719 of a PostgreSQL database cluster
720 </para>
721 <indexterm zone="postgresql pg_resetwal">
722 <primary sortas="b-pg_resetwal">pg_resetwal</primary>
723 </indexterm>
724 </listitem>
725 </varlistentry>
726
727 <varlistentry id="pg_restore">
728 <term><command>pg_restore</command></term>
729 <listitem>
730 <para>
731 creates databases from dump files created by
732 <command>pg_dump</command>
733 </para>
734 <indexterm zone="postgresql pg_restore">
735 <primary sortas="b-pg_restore">pg_restore</primary>
736 </indexterm>
737 </listitem>
738 </varlistentry>
739
740 <varlistentry id="pg_rewind">
741 <term><command>pg_rewind</command></term>
742 <listitem>
743 <para>
744 synchronizes a PostgreSQL data directory with another data
745 directory that was forked from the first one
746 </para>
747 <indexterm zone="postgresql pg_rewind">
748 <primary sortas="b-pg_rewind">pg_rewind</primary>
749 </indexterm>
750 </listitem>
751 </varlistentry>
752
753 <varlistentry id="pg_standby">
754 <term><command>pg_standby</command></term>
755 <listitem>
756 <para>
757 supports the creation of a PostgreSQL warm standby server
758 </para>
759 <indexterm zone="postgresql pg_standby">
760 <primary sortas="b-pg_standby">pg_standby</primary>
761 </indexterm>
762 </listitem>
763 </varlistentry>
764
765 <varlistentry id="pg_test_fsync">
766 <term><command>pg_test_fsync</command></term>
767 <listitem>
768 <para>
769 determines the fastest wal_sync method for PostgreSQL
770 </para>
771 <indexterm zone="postgresql pg_test_fsync">
772 <primary sortas="b-pg_test_fsync">pg_test_fsync</primary>
773 </indexterm>
774 </listitem>
775 </varlistentry>
776
777 <varlistentry id="pg_test_timing">
778 <term><command>pg_test_timing</command></term>
779 <listitem>
780 <para>
781 measures timing overhead
782 </para>
783 <indexterm zone="postgresql pg_test_timing">
784 <primary sortas="b-pg_test_timing">pg_test_timing</primary>
785 </indexterm>
786 </listitem>
787 </varlistentry>
788
789 <varlistentry id="pg_upgrade">
790 <term><command>pg_upgrade</command></term>
791 <listitem>
792 <para>
793 upgrades a PostgreSQL server instance
794 </para>
795 <indexterm zone="postgresql pg_upgrade">
796 <primary sortas="b-pg_upgrade">pg_upgrade</primary>
797 </indexterm>
798 </listitem>
799 </varlistentry>
800
801 <varlistentry id="pg_verifybackup">
802 <term><command>pg_verifybackup</command></term>
803 <listitem>
804 <para>
805 verifies the integrity of a base backup of a PostgreSQL cluster
806 </para>
807 <indexterm zone="postgresql pg_verifybackup">
808 <primary sortas="b-pg_upgrade">pg_verifybackup</primary>
809 </indexterm>
810 </listitem>
811 </varlistentry>
812
813 <varlistentry id="pg_waldump">
814 <term><command>pg_waldump</command></term>
815 <listitem>
816 <para>
817 displays a human-readable rendering of the write-ahead log of a
818 PostgreSQL database cluster
819 </para>
820 <indexterm zone="postgresql pg_waldump">
821 <primary sortas="b-pg_waldump">pg_waldump</primary>
822 </indexterm>
823 </listitem>
824 </varlistentry>
825
826 <varlistentry id="pgbench">
827 <term><command>pgbench</command></term>
828 <listitem>
829 <para>
830 runs a benchmark test on PostgreSQL
831 </para>
832 <indexterm zone="postgresql pgbench">
833 <primary sortas="b-pgbench">pgbench</primary>
834 </indexterm>
835 </listitem>
836 </varlistentry>
837
838 <varlistentry id="pltcl_delmod">
839 <term><command>pltcl_delmod</command></term>
840 <listitem>
841 <para>
842 is a support script used to delete a module from a
843 PL/<application>Tcl</application> table. The command
844 requires the
845 <ulink url="https://flightaware.github.io/Pgtcl/">Pgtcl</ulink>
846 package to be installed
847 </para>
848 <indexterm zone="postgresql pltcl_delmod">
849 <primary sortas="b-pltcl_delmod">pltcl_delmod</primary>
850 </indexterm>
851 </listitem>
852 </varlistentry>
853
854 <varlistentry id="pltcl_listmod">
855 <term><command>pltcl_listmod</command></term>
856 <listitem>
857 <para>
858 is a support script used to list the modules in a
859 PL/<application>Tcl</application> table. The command
860 requires the
861 <ulink url="https://flightaware.github.io/Pgtcl/">Pgtcl</ulink>
862 package to be installed
863 </para>
864 <indexterm zone="postgresql pltcl_listmod">
865 <primary sortas="b-pltcl_listmod">pltcl_listmod</primary>
866 </indexterm>
867 </listitem>
868 </varlistentry>
869
870 <varlistentry id="pltcl_loadmod">
871 <term><command>pltcl_loadmod</command></term>
872 <listitem>
873 <para>
874 is a support script used to load a module into a
875 PL/<application>Tcl</application> table. The command
876 requires the
877 <ulink url="https://flightaware.github.io/Pgtcl/">Pgtcl</ulink>
878 package to be installed too
879 </para>
880 <indexterm zone="postgresql pltcl_loadmod">
881 <primary sortas="b-pltcl_loadmod">pltcl_loadmod</primary>
882 </indexterm>
883 </listitem>
884 </varlistentry>
885
886 <varlistentry id="postgres">
887 <term><command>postgres</command></term>
888 <listitem>
889 <para>
890 is the PostgreSQL database server
891 </para>
892 <indexterm zone="postgresql postgres">
893 <primary sortas="b-postgres">postgres</primary>
894 </indexterm>
895 </listitem>
896 </varlistentry>
897
898<!-- Removed in 16.0
899 <varlistentry id="postmaster">
900 <term><command>postmaster</command></term>
901 <listitem>
902 <para>
903 (deprecated, a symlink to <command>postgres</command>) is a
904 multi-user database daemon
905 </para>
906 <indexterm zone="postgresql postmaster">
907 <primary sortas="b-postmaster">postmaster</primary>
908 </indexterm>
909 </listitem>
910 </varlistentry>
911-->
912
913 <varlistentry id="psql">
914 <term><command>psql</command></term>
915 <listitem>
916 <para>
917 is a console based database shell
918 </para>
919 <indexterm zone="postgresql psql">
920 <primary sortas="b-psql">psql</primary>
921 </indexterm>
922 </listitem>
923 </varlistentry>
924
925 <varlistentry id="reindexdb">
926 <term><command>reindexdb</command></term>
927 <listitem>
928 <para>
929 is a utility for rebuilding indexes in a database
930 </para>
931 <indexterm zone="postgresql reindexdb">
932 <primary sortas="b-reindexdb">reindexdb</primary>
933 </indexterm>
934 </listitem>
935 </varlistentry>
936
937 <varlistentry id="vacuumdb">
938 <term><command>vacuumdb</command></term>
939 <listitem>
940 <para>
941 compacts databases and generates statistics for the query analyzer
942 </para>
943 <indexterm zone="postgresql vacuumdb">
944 <primary sortas="b-vacuumdb">vacuumdb</primary>
945 </indexterm>
946 </listitem>
947 </varlistentry>
948
949 <varlistentry id="vacuumlo">
950 <term><command>vacuumlo</command></term>
951 <listitem>
952 <para>
953 removes orphaned large objects from a PostgreSQL database
954 </para>
955 <indexterm zone="postgresql vacuumlo">
956 <primary sortas="b-vacuumlo">vacuumlo</primary>
957 </indexterm>
958 </listitem>
959 </varlistentry>
960
961 <varlistentry id="libecpg">
962 <term><filename class="libraryfile">libecpg.{so,a}</filename></term>
963 <listitem>
964 <para>
965 contains functions to support embedded SQL in C programs
966 </para>
967 <indexterm zone="postgresql libecpg">
968 <primary sortas="c-libecpg">libecpg.{so,a}</primary>
969 </indexterm>
970 </listitem>
971 </varlistentry>
972
973 <varlistentry id="libecpg_compat">
974 <term><filename class="libraryfile">libecpg_compat.{so,a}</filename></term>
975 <listitem>
976 <para>
977 is the ecpg compatibility library
978 </para>
979 <indexterm zone="postgresql libecpg_compat">
980 <primary sortas="c-libecpg_compat">libecpg_compat.{so,a}</primary>
981 </indexterm>
982 </listitem>
983 </varlistentry>
984
985 <varlistentry id="libgport">
986 <term><filename class="libraryfile">libgport.a</filename></term>
987 <listitem>
988 <para>
989 is the port-specific subsystem of the Postgres backend
990 </para>
991 <indexterm zone="postgresql libgport">
992 <primary sortas="c-libgport">libgport.a</primary>
993 </indexterm>
994 </listitem>
995 </varlistentry>
996
997 <varlistentry id="libpgtypes">
998 <term><filename class="libraryfile">libpgtypes.{so,a}</filename></term>
999 <listitem>
1000 <para>
1001 contains functions for dealing with Postgres data types
1002 </para>
1003 <indexterm zone="postgresql libpgtypes">
1004 <primary sortas="c-libpgtypes">libpgtypes.{so,a}</primary>
1005 </indexterm>
1006 </listitem>
1007 </varlistentry>
1008
1009 <varlistentry id="libpq">
1010 <term><filename class="libraryfile">libpq.{so,a}</filename></term>
1011 <listitem>
1012 <para>
1013 is the C programmer's API to Postgres
1014 </para>
1015 <indexterm zone="postgresql libpq">
1016 <primary sortas="c-libpq">libpq.{so,a}</primary>
1017 </indexterm>
1018 </listitem>
1019 </varlistentry>
1020
1021 </variablelist>
1022
1023 </sect2>
1024
1025</sect1>
Note: See TracBrowser for help on using the repository browser.