source: server/databases/postgresql.xml@ 89d14d5

11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/soup3 xry111/xf86-video-removal
Last change on this file since 89d14d5 was 0adae6f, checked in by Pierre Labastie <pierre.labastie@…>, 2 years ago

Update to postgresql-14.4

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