source: server/databases/postgresql.xml@ 42ddc30

12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 42ddc30 was 42ddc30, checked in by Xi Ruoyao <xry111@…>, 11 months ago

treewide: Replace "User Notes" with "Editor Notes"

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