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