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