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@…>, 12 months ago

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

  • Property mode set to 100644
File size: 35.4 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 " ">
[18961b4]10 <!ENTITY postgresql-md5sum "7cb75773ff8fbe533701562c3278206b">
11 <!ENTITY postgresql-size "22 MB">
12 <!ENTITY postgresql-buildsize "213 MB (add 42 MB for tests)">
[106a055]13 <!ENTITY postgresql-time "0.6 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
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
[4472e923]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>
[4ab91cd]34
[ac0d66d]35 &lfs113_checked;
[a1813d08]36
[4ab91cd]37 <bridgehead renderas="sect3">Package Information</bridgehead>
38 <itemizedlist spacing="compact">
39 <listitem>
[4472e923]40 <para>
41 Download (HTTP): <ulink url="&postgresql-download-http;"/>
42 </para>
[4ab91cd]43 </listitem>
44 <listitem>
[4472e923]45 <para>
46 Download (FTP): <ulink url="&postgresql-download-ftp;"/>
47 </para>
[4ab91cd]48 </listitem>
49 <listitem>
[4472e923]50 <para>
51 Download MD5 sum: &postgresql-md5sum;
52 </para>
[4ab91cd]53 </listitem>
54 <listitem>
[4472e923]55 <para>
56 Download size: &postgresql-size;
57 </para>
[4ab91cd]58 </listitem>
59 <listitem>
[4472e923]60 <para>
61 Estimated disk space required: &postgresql-buildsize;
62 </para>
[4ab91cd]63 </listitem>
64 <listitem>
[4472e923]65 <para>
66 Estimated build time: &postgresql-time;
67 </para>
[4ab91cd]68 </listitem>
69 </itemizedlist>
70
71 <bridgehead renderas="sect3">PostgreSQL Dependencies</bridgehead>
72
73 <bridgehead renderas="sect4">Optional</bridgehead>
[a7ff037]74 <para role="optional">
[098f474]75 <!-- <xref linkend="tcl"/>, (is in LFS core) -->
[eee261a]76 <xref linkend="icu"/>,
[a7ff037]77 <xref linkend="libxml2"/>,
78 <xref linkend="libxslt"/>,
79 <xref linkend="openldap"/>,
80 <xref linkend="linux-pam"/>,
81 <xref linkend="mitkrb"/> and
[88057a1]82 <ulink url="https://developer.apple.com/bonjour/">Bonjour</ulink>
[a7ff037]83 </para>
[5aa1d3dd]84
85 <bridgehead renderas="sect4">Optional (To Regenerate Documentation)</bridgehead>
[a7ff037]86 <para role="optional">
[af1a5b1]87 <xref linkend="fop"/>,
[a7ff037]88 <xref linkend="sgml-dtd"/>,
89 <xref linkend="docbook-dsssl"/>,
[af1a5b1]90 <xref linkend="docbook-utils"/>,
[a7ff037]91 <xref linkend="openjade"/>, and
[4392a40]92 <xref linkend="perl-sgmlspm"/>
[a7ff037]93 </para>
[4ab91cd]94
[42ddc30]95 <para condition="html" role="usernotes">Editor Notes:
[3cb0c57]96 <ulink url="&blfs-wiki;/postgresql"/></para>
97
[4ab91cd]98 </sect2>
99
100 <sect2 role="installation">
101 <title>Installation of PostgreSQL</title>
102
[8753831e]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
[4472e923]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>
[9b98149]121
[4472e923]122 <para>
123 Install <application>PostgreSQL</application> with the
124 following commands:
125 </para>
[08254fc]126
[62a6a73]127<screen><userinput>sed -i '/DEFAULT_PGSOCKET_DIR/s@/tmp@/run/postgresql@' src/include/pg_config_manual.h &amp;&amp;
[5be5fc08]128
[faf325d]129./configure --prefix=/usr \
[e0cafc9]130 --enable-thread-safety \
131 --docdir=/usr/share/doc/postgresql-&postgresql-version; &amp;&amp;
[4ab91cd]132make</userinput></screen>
[44e4099]133
[4472e923]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.
[782bf3d0]141 </para>
142
[4472e923]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>
[49a38a1]153
[bcdfc53]154 <note>
[7a9a7b26]155 <para>If you are installing <application>PostgreSQL</application> to
[60351e5b]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.
[7a9a7b26]159 new software cannot act on the existing data files. In this case, the
[60351e5b]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>
[a38fe9f]162
163 <para>
[60351e5b]164 Before upgrading an existing installation of PostgreSQL, check
165 the documentation for any considerations that you must keep in mind
[7a9a7b26]166 during the upgrade. Note that new major versions might use a different
[60351e5b]167 binary format in the data objects, causing potential incompatibilities.
168 For more information, check out upstream's documentation about
169 upgrading PostgreSQL here.
[a38fe9f]170 <ulink url="https://www.postgresql.org/docs/current/upgrading.html"/>.
171 </para>
172
[60351e5b]173 <para>At this point, you may have both the old and the new binaries
[7a9a7b26]174 installed on your filesystem. These binaries can be used to perform an
175 upgrade of your existing database files. For the following instructions
[60351e5b]176 it is assumed that
[bcdfc53]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
[228248e]191 <para>First, do a temporary install which makes access to the new
[60351e5b]192 binaries much easier:</para>
[bc9c5251]193<screen role="nodump"><userinput>make DESTDIR=$(pwd)/DESTDIR install</userinput></screen>
[bcdfc53]194
[60351e5b]195 <para>Next, create a directory which is writable by the
196 <systemitem class="username">postgres</systemitem> user, as the
[bcdfc53]197 <systemitem class="username">root</systemitem> user:</para>
[7a9a7b26]198
[27abacc]199<screen role="nodump"><userinput>install -d -o postgres $(pwd)/DESTDIR/tmp</userinput></screen>
[7a9a7b26]200
[bcdfc53]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>
[7a9a7b26]204
[bc9c5251]205<screen revision="sysv" role="nodump"><userinput>pushd $(pwd)/DESTDIR/tmp
[bcdfc53]206/etc/rc.d/init.d/postgresql stop
207su postgres -c "../usr/bin/initdb -D /srv/pgsql/newdata"
[e99a437]208su postgres -c "../usr/bin/pg_upgrade \
209 -d /srv/pgsql/data -b /usr/bin \
210 -D /srv/pgsql/newdata -B ../usr/bin"
[bcdfc53]211popd</userinput></screen>
[60351e5b]212
[9532fa4]213<screen revision="systemd" role="nodump"><userinput>pushd $(pwd)/DESTDIR/tmp
[60351e5b]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
[228248e]221 <para>At this point, your database files are available in two locations on
[7a9a7b26]222 disk. The old data is located in
[60351e5b]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>
[7a9a7b26]226
227 <para>Next, remove the old database files, and rename the new data
[bcdfc53]228 directory as the <systemitem class="username">root</systemitem> user:</para>
[7a9a7b26]229
[bc9c5251]230<screen role="nodump"><userinput>rm -rf /srv/pgsql/data
[bcdfc53]231mv /srv/pgsql/newdata /srv/pgsql/data</userinput></screen>
232
233 </note>
[7a9a7b26]234
[4472e923]235 <para>
236 Now, as the <systemitem class="username">root</systemitem> user:
237 </para>
[44e4099]238
[e0cafc9]239<screen role="root"><userinput>make install &amp;&amp;
[4f2c94fc]240make install-docs</userinput></screen>
[11404f5]241
[4472e923]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>
[782bf3d0]246
[ca8c3c05]247<screen role="nodump"><userinput>make -C contrib/<replaceable>&lt;SUBDIR-NAME&gt;</replaceable> install</userinput></screen>
[782bf3d0]248
[4472e923]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>
[08254fc]256
[bcdfc53]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
[4472e923]264 <para>
265 Initialize a database cluster with the following commands issued by the
266 <systemitem class="username">root</systemitem> user:
267 </para>
[08254fc]268
[faf325d]269<screen role="root"><userinput>install -v -dm700 /srv/pgsql/data &amp;&amp;
270install -v -dm755 /run/postgresql &amp;&amp;
[fcafd3d]271chown -Rv postgres:postgres /srv/pgsql /run/postgresql</userinput></screen>
272
[4472e923]273 <para>
274 Now, initialize the database as the <systemitem
275 class="username">root</systemitem> user:
276 </para>
[fcafd3d]277
[a7b7eceb]278<screen role="root"><userinput>su - postgres -c '/usr/bin/initdb -D /srv/pgsql/data'</userinput></screen>
[fcafd3d]279
[4ab91cd]280 </sect2>
281
282 <sect2 role="commands">
283 <title>Command Explanations</title>
284
[faf325d]285 <para>
[eee261a]286 <command>sed -i ...</command>: This sed changes the server socket location
[faf325d]287 from <filename class="directory">/tmp</filename> to
[0adae6f]288 <filename class="directory">/run/postgresql</filename>.
[faf325d]289 </para>
290
[4472e923]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>
[4ab91cd]297
[4472e923]298 <para>
299 <option>--with-openssl</option>: builds the package with support for
300 <application>OpenSSL</application> encrypted connections.
301 </para>
[a2957b7]302
[4472e923]303 <para>
304 <option>--with-perl</option>: builds the PL/Perl server-side language.
[76acb620]305 </para>
306
[4472e923]307 <para>
308 <option>--with-python</option>: builds the PL/Python server-side
[098f474]309 language. Python3 is used by default, Python2 is no longer supported.
[4472e923]310 </para>
[76acb620]311
[4472e923]312 <para>
313 <option>--with-tcl</option>: builds the PL/Tcl server-side language.
314 </para>
[76acb620]315
[4ab91cd]316 </sect2>
317
318 <sect2 role="configuration">
319 <title>Configuring PostgreSQL</title>
320
321 <sect3 id="postgresql-config">
322 <title>Config Files</title>
323
[4472e923]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>
[4ab91cd]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
[4472e923]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>
[4ab91cd]352
353 </sect3>
354
355 <sect3 id="postgresql-init">
[1258125]356 <title><phrase revision="sysv">Boot Script</phrase>
357 <phrase revision="systemd">Systemd Unit</phrase></title>
358
[4472e923]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>
[4ab91cd]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
[8753831e]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>
[4472e923]414 When you are done with testing, you can shut down the server, by
415 issuing as <systemitem class="username">root</systemitem>:
[8753831e]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
[4ab91cd]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>
[1a60731f]433 <seg>
[a82b5f44]434 clusterdb, createdb, createuser, dropdb, dropuser,
[0adae6f]435 ecpg, initdb, pg_amcheck, pg_archivecleanup, pg_basebackup,
436 pg_checksums,
[f1ae52ff]437 pg_config, pg_controldata, pg_ctl, pg_dump, pg_dumpall, pg_isready,
438 pg_receivewal, pg_recvlogical, pg_resetwal, pg_restore, pg_rewind,
[eee261a]439 pg_test_fsync, pg_test_timing, pg_upgrade, pg_verifybackup,
[a82b5f44]440 pg_waldump, pgbench,
[fa30d84]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
[1a60731f]446 </seg>
447 <seg>
[8558044]448 libecpg.{so,a}, libecpg_compat.{so,a}, libpgcommon.a,
[f1ae52ff]449 libpgcommon_shlib.a, libpgfeutils.a, libpgport.a, libpgport_shlib.a,
[a82b5f44]450 libpgtypes.{so,a}, libpq.{so,a}, various charset modules and
[1a60731f]451 optionally programming language modules under /usr/lib/postgresql
452 </seg>
453 <seg>
454 /usr/include/{libpq,postgresql},
455 /usr/lib/postgresql,
[9ad19294]456 /usr/share/{doc/postgresql-&postgresql-version;,postgresql}, and
[1a60731f]457 /srv/pgsql
458 </seg>
[4ab91cd]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>
[4472e923]470 <para>
471 is a utility for reclustering tables in a
[4c24eb0a]472 <application>PostgreSQL</application> database
[4472e923]473 </para>
[4ab91cd]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>
[4472e923]483 <para>
484 creates a new <application>PostgreSQL</application>
[4c24eb0a]485 database
[4472e923]486 </para>
[4ab91cd]487 <indexterm zone="postgresql createdb">
488 <primary sortas="b-createdb">createdb</primary>
489 </indexterm>
490 </listitem>
491 </varlistentry>
[8558044]492
[4ab91cd]493 <varlistentry id="createuser">
494 <term><command>createuser</command></term>
495 <listitem>
[4472e923]496 <para>
497 defines a new <application>PostgreSQL</application>
[4c24eb0a]498 user account
[4472e923]499 </para>
[4ab91cd]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>
[4472e923]509 <para>
[4c24eb0a]510 removes a <application>PostgreSQL</application> database
[4472e923]511 </para>
[4ab91cd]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>
[4472e923]521 <para>
[4c24eb0a]522 removes a <application>PostgreSQL</application> user account
[4472e923]523 </para>
[4ab91cd]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>
[4472e923]533 <para>
[4c24eb0a]534 is the embedded SQL preprocessor
[4472e923]535 </para>
[4ab91cd]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>
[4472e923]545 <para>
[4c24eb0a]546 creates a new database cluster
[4472e923]547 </para>
[4ab91cd]548 <indexterm zone="postgresql initdb">
549 <primary sortas="b-initdb">initdb</primary>
550 </indexterm>
551 </listitem>
552 </varlistentry>
553
[782bf3d0]554 <varlistentry id="oid2name">
555 <term><command>oid2name</command></term>
556 <listitem>
[4472e923]557 <para>
558 resolves OIDs (Object IDs) and file nodes in a PostgreSQL data
[4c24eb0a]559 directory
[4472e923]560 </para>
[782bf3d0]561 <indexterm zone="postgresql oid2name">
562 <primary sortas="b-oid2name">oid2name</primary>
563 </indexterm>
564 </listitem>
565 </varlistentry>
566
[0adae6f]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
[782bf3d0]579 <varlistentry id="pg_archivecleanup">
580 <term><command>pg_archivecleanup</command></term>
581 <listitem>
[4472e923]582 <para>
[4c24eb0a]583 cleans up PostgreSQL WAL (write-ahead log) archive files
[4472e923]584 </para>
[782bf3d0]585 <indexterm zone="postgresql pg_archivecleanup">
586 <primary sortas="b-pg_archivecleanup">pg_archivecleanup</primary>
587 </indexterm>
588 </listitem>
589 </varlistentry>
590
[a2957b7]591 <varlistentry id="pg_basebackup">
592 <term><command>pg_basebackup</command></term>
[4ab91cd]593 <listitem>
[4472e923]594 <para>
595 takes base backups of a running
[4c24eb0a]596 <application>PostgreSQL</application> cluster
[4472e923]597 </para>
[a2957b7]598 <indexterm zone="postgresql pg_basebackup">
599 <primary sortas="b-pg_basebackup">pg_basebackup</primary>
[4ab91cd]600 </indexterm>
601 </listitem>
602 </varlistentry>
603
[f1ae52ff]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
[4c24eb0a]609 <application>PostgreSQL</application> database cluster
[f1ae52ff]610 </para>
611 <indexterm zone="postgresql pg_checksums">
612 <primary sortas="b-pg_checksums">pg_checksums</primary>
613 </indexterm>
614 </listitem>
615 </varlistentry>
616
[4ab91cd]617 <varlistentry id="pg_config">
618 <term><command>pg_config</command></term>
619 <listitem>
[4472e923]620 <para>
621 retrieves <application>PostgreSQL</application> version
[4c24eb0a]622 information
[4472e923]623 </para>
[4ab91cd]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>
[4472e923]633 <para>
634 returns information initialized during <command>initdb</command>,
[4c24eb0a]635 such as the catalog version and server locale
[4472e923]636 </para>
[4ab91cd]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>
[4472e923]646 <para>
[4c24eb0a]647 controls stopping and starting the database server
[4472e923]648 </para>
[4ab91cd]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>
[4472e923]658 <para>
659 dumps database data and metadata into scripts which are used
[4c24eb0a]660 to recreate the database
[4472e923]661 </para>
[4ab91cd]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>
[4472e923]671 <para>
672 recursively calls <command>pg_dump</command> for each
[4c24eb0a]673 database in a cluster
[4472e923]674 </para>
[4ab91cd]675 <indexterm zone="postgresql pg_dumpall">
676 <primary sortas="b-pg_dumpall">pg_dumpall</primary>
677 </indexterm>
678 </listitem>
679 </varlistentry>
680
[782bf3d0]681 <varlistentry id="pg_isready">
682 <term><command>pg_isready</command></term>
683 <listitem>
[4472e923]684 <para>
[4c24eb0a]685 checks the connection status of a PostgreSQL server
[4472e923]686 </para>
[782bf3d0]687 <indexterm zone="postgresql pg_isready">
688 <primary sortas="b-pg_isready">pg_isready</primary>
689 </indexterm>
690 </listitem>
691 </varlistentry>
692
[1aecb6f]693 <varlistentry id="pg_receivewal">
694 <term><command>pg_receivewal</command></term>
[298fee30]695 <listitem>
696 <para>
[4c24eb0a]697 is used to stream write-ahead logs from a PostgreSQL server
[298fee30]698 </para>
[1aecb6f]699 <indexterm zone="postgresql pg_receivewal">
700 <primary sortas="b-pg_receivewal">pg_receivewal</primary>
[298fee30]701 </indexterm>
702 </listitem>
703 </varlistentry>
704
[0f23f29]705 <varlistentry id="pg_recvlogical">
706 <term><command>pg_recvlogical</command></term>
707 <listitem>
[4472e923]708 <para>
[4c24eb0a]709 controls PostgreSQL logical decoding streams
[4472e923]710 </para>
[0f23f29]711 <indexterm zone="postgresql pg_recvlogical">
712 <primary sortas="b-pg_recvlogical">pg_recvlogical</primary>
713 </indexterm>
714 </listitem>
715 </varlistentry>
716
[1aecb6f]717 <varlistentry id="pg_resetwal">
718 <term><command>pg_resetwal</command></term>
[4ab91cd]719 <listitem>
[4472e923]720 <para>
721 resets the write-ahead log and other control information
[4c24eb0a]722 of a PostgreSQL database cluster
[4472e923]723 </para>
[1aecb6f]724 <indexterm zone="postgresql pg_resetwal">
725 <primary sortas="b-pg_resetwal">pg_resetwal</primary>
[4ab91cd]726 </indexterm>
727 </listitem>
728 </varlistentry>
729
730 <varlistentry id="pg_restore">
731 <term><command>pg_restore</command></term>
732 <listitem>
[4472e923]733 <para>
734 creates databases from dump files created by
[4c24eb0a]735 <command>pg_dump</command>
[4472e923]736 </para>
[4ab91cd]737 <indexterm zone="postgresql pg_restore">
738 <primary sortas="b-pg_restore">pg_restore</primary>
739 </indexterm>
740 </listitem>
741 </varlistentry>
742
[edccd1f8]743 <varlistentry id="pg_rewind">
744 <term><command>pg_rewind</command></term>
745 <listitem>
[4472e923]746 <para>
747 synchronizes a PostgreSQL data directory with another data
[4c24eb0a]748 directory that was forked from the first one
[4472e923]749 </para>
[edccd1f8]750 <indexterm zone="postgresql pg_rewind">
751 <primary sortas="b-pg_rewind">pg_rewind</primary>
752 </indexterm>
753 </listitem>
754 </varlistentry>
755
[782bf3d0]756 <varlistentry id="pg_standby">
757 <term><command>pg_standby</command></term>
758 <listitem>
[4472e923]759 <para>
[4c24eb0a]760 supports the creation of a PostgreSQL warm standby server
[4472e923]761 </para>
[782bf3d0]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>
[4472e923]771 <para>
[4c24eb0a]772 determines the fastest wal_sync method for PostgreSQL
[4472e923]773 </para>
[782bf3d0]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>
[4472e923]783 <para>
[4c24eb0a]784 measures timing overhead
[4472e923]785 </para>
[782bf3d0]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>
[4472e923]795 <para>
[4c24eb0a]796 upgrades a PostgreSQL server instance
[4472e923]797 </para>
[782bf3d0]798 <indexterm zone="postgresql pg_upgrade">
799 <primary sortas="b-pg_upgrade">pg_upgrade</primary>
800 </indexterm>
801 </listitem>
802 </varlistentry>
803
[a82b5f44]804 <varlistentry id="pg_verifybackup">
805 <term><command>pg_verifybackup</command></term>
806 <listitem>
807 <para>
[4c24eb0a]808 verifies the integrity of a base backup of a PostgreSQL cluster
[a82b5f44]809 </para>
810 <indexterm zone="postgresql pg_verifybackup">
811 <primary sortas="b-pg_upgrade">pg_verifybackup</primary>
812 </indexterm>
813 </listitem>
814 </varlistentry>
815
[1aecb6f]816 <varlistentry id="pg_waldump">
817 <term><command>pg_waldump</command></term>
[782bf3d0]818 <listitem>
[4472e923]819 <para>
820 displays a human-readable rendering of the write-ahead log of a
[4c24eb0a]821 PostgreSQL database cluster
[4472e923]822 </para>
[1aecb6f]823 <indexterm zone="postgresql pg_waldump">
824 <primary sortas="b-pg_waldump">pg_waldump</primary>
[782bf3d0]825 </indexterm>
826 </listitem>
827 </varlistentry>
828
829 <varlistentry id="pgbench">
830 <term><command>pgbench</command></term>
831 <listitem>
[4472e923]832 <para>
[4c24eb0a]833 runs a benchmark test on PostgreSQL
[4472e923]834 </para>
[782bf3d0]835 <indexterm zone="postgresql pgbench">
836 <primary sortas="b-pgbench">pgbench</primary>
837 </indexterm>
838 </listitem>
839 </varlistentry>
840
[4ab91cd]841 <varlistentry id="pltcl_delmod">
842 <term><command>pltcl_delmod</command></term>
843 <listitem>
[4472e923]844 <para>
845 is a support script used to delete a module from a
846 PL/<application>Tcl</application> table. The command
[4c24eb0a]847 requires the
[90fb8f6]848 <ulink url="https://flightaware.github.io/Pgtcl/">Pgtcl</ulink>
[4c24eb0a]849 package to be installed
[4472e923]850 </para>
[4ab91cd]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>
[4472e923]860 <para>
861 is a support script used to list the modules in a
862 PL/<application>Tcl</application> table. The command
[4c24eb0a]863 requires the
[90fb8f6]864 <ulink url="https://flightaware.github.io/Pgtcl/">Pgtcl</ulink>
[4c24eb0a]865 package to be installed
[4472e923]866 </para>
[4ab91cd]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>
[4472e923]876 <para>
877 is a support script used to load a module into a
878 PL/<application>Tcl</application> table. The command
[4c24eb0a]879 requires the
[90fb8f6]880 <ulink url="https://flightaware.github.io/Pgtcl/">Pgtcl</ulink>
[4c24eb0a]881 package to be installed too
[4472e923]882 </para>
[4ab91cd]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>
[4472e923]892 <para>
[4c24eb0a]893 is the PostgreSQL database server
[4472e923]894 </para>
[4ab91cd]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>
[4472e923]904 <para>
905 (deprecated, a symlink to <command>postgres</command>) is a
[4c24eb0a]906 multi-user database daemon
[4472e923]907 </para>
[4ab91cd]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>
[4472e923]917 <para>
[4c24eb0a]918 is a console based database shell
[4472e923]919 </para>
[4ab91cd]920 <indexterm zone="postgresql psql">
921 <primary sortas="b-psql">psql</primary>
922 </indexterm>
923 </listitem>
924 </varlistentry>
925
[aaeca54]926 <varlistentry id="reindexdb">
927 <term><command>reindexdb</command></term>
928 <listitem>
[4472e923]929 <para>
[4c24eb0a]930 is a utility for rebuilding indexes in a database
[4472e923]931 </para>
[621a551]932 <indexterm zone="postgresql reindexdb">
933 <primary sortas="b-reindexdb">reindexdb</primary>
[aaeca54]934 </indexterm>
935 </listitem>
936 </varlistentry>
937
[4ab91cd]938 <varlistentry id="vacuumdb">
939 <term><command>vacuumdb</command></term>
940 <listitem>
[4472e923]941 <para>
[4c24eb0a]942 compacts databases and generates statistics for the query analyzer
[4472e923]943 </para>
[4ab91cd]944 <indexterm zone="postgresql vacuumdb">
945 <primary sortas="b-vacuumdb">vacuumdb</primary>
946 </indexterm>
[782bf3d0]947 </listitem>
948 </varlistentry>
949
950 <varlistentry id="vacuumlo">
951 <term><command>vacuumlo</command></term>
952 <listitem>
[4472e923]953 <para>
[4c24eb0a]954 removes orphaned large objects from a PostgreSQL database
[4472e923]955 </para>
[782bf3d0]956 <indexterm zone="postgresql vacuumlo">
957 <primary sortas="b-vacuumlo">vacuumlo</primary>
958 </indexterm>
[4ab91cd]959 </listitem>
960 </varlistentry>
961
[76acb620]962 <varlistentry id="libecpg">
[4c24eb0a]963 <term><filename class="libraryfile">libecpg.{so,a}</filename></term>
[76acb620]964 <listitem>
[4472e923]965 <para>
[4c24eb0a]966 contains functions to support embedded SQL in C programs
[4472e923]967 </para>
[76acb620]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">
[4c24eb0a]975 <term><filename class="libraryfile">libecpg_compat.{so,a}</filename></term>
[76acb620]976 <listitem>
[4472e923]977 <para>
[4c24eb0a]978 is the ecpg compatibility library
[4472e923]979 </para>
[76acb620]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">
[4c24eb0a]987 <term><filename class="libraryfile">libgport.a</filename></term>
[76acb620]988 <listitem>
[4472e923]989 <para>
[4c24eb0a]990 is the port-specific subsystem of the Postgres backend
[4472e923]991 </para>
[76acb620]992 <indexterm zone="postgresql libgport">
993 <primary sortas="c-libgport">libgport.a</primary>
994 </indexterm>
995 </listitem>
996 </varlistentry>
997
998 <varlistentry id="libpgtypes">
[4c24eb0a]999 <term><filename class="libraryfile">libpgtypes.{so,a}</filename></term>
[76acb620]1000 <listitem>
[4472e923]1001 <para>
[4c24eb0a]1002 contains functions for dealing with Postgres data types
[4472e923]1003 </para>
[76acb620]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">
[4c24eb0a]1011 <term><filename class="libraryfile">libpq.{so,a}</filename></term>
[76acb620]1012 <listitem>
[4472e923]1013 <para>
[4c24eb0a]1014 is the C programmer's API to Postgres
[4472e923]1015 </para>
[76acb620]1016 <indexterm zone="postgresql libpq">
1017 <primary sortas="c-libpq">libpq.{so,a}</primary>
1018 </indexterm>
1019 </listitem>
1020 </varlistentry>
1021
[4ab91cd]1022 </variablelist>
1023
1024 </sect2>
[458342f]1025
1026</sect1>
Note: See TracBrowser for help on using the repository browser.