source: server/databases/postgresql.xml@ 12d9b07

12.1 12.2 gimp3 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/for-12.3 xry111/llvm18 xry111/spidermonkey128
Last change on this file since 12d9b07 was ace0703, checked in by Douglas R. Reno <renodr@…>, 12 months ago

Update to postgresql-16.0

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