[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 |
|
---|
[a7ff037] | 7 | <!ENTITY postgresql-download-http "http://ftp.postgresql.org/pub/source/v&postgresql-version;/postgresql-&postgresql-version;.tar.bz2">
|
---|
| 8 | <!ENTITY postgresql-download-ftp "ftp://ftp.postgresql.org/pub/source/v&postgresql-version;/postgresql-&postgresql-version;.tar.bz2">
|
---|
[dd9e0c3] | 9 | <!ENTITY postgresql-md5sum "3f0c388566c688c82b01a0edf1e6b7a0">
|
---|
[37191af] | 10 | <!ENTITY postgresql-size "17.6 MB">
|
---|
| 11 | <!ENTITY postgresql-buildsize "190 MB (with tests)">
|
---|
| 12 | <!ENTITY postgresql-time "1.9 SBU (with tests)">
|
---|
[08254fc] | 13 | ]>
|
---|
| 14 |
|
---|
[458342f] | 15 | <sect1 id="postgresql" xreflabel="PostgreSQL-&postgresql-version;">
|
---|
[4ab91cd] | 16 | <?dbhtml filename="postgresql.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 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 |
|
---|
| 32 | <para><application>PostgreSQL</application> is an advanced
|
---|
| 33 | object-relational database management system (ORDBMS), derived
|
---|
| 34 | from the Berkeley Postgres database management system.</para>
|
---|
| 35 |
|
---|
[2df08064] | 36 | &lfs78_checked;
|
---|
[a1813d08] | 37 |
|
---|
[4ab91cd] | 38 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 39 | <itemizedlist spacing="compact">
|
---|
| 40 | <listitem>
|
---|
| 41 | <para>Download (HTTP): <ulink url="&postgresql-download-http;"/></para>
|
---|
| 42 | </listitem>
|
---|
| 43 | <listitem>
|
---|
| 44 | <para>Download (FTP): <ulink url="&postgresql-download-ftp;"/></para>
|
---|
| 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
| 47 | <para>Download MD5 sum: &postgresql-md5sum;</para>
|
---|
| 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>Download size: &postgresql-size;</para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>Estimated disk space required: &postgresql-buildsize;</para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>Estimated build time: &postgresql-time;</para>
|
---|
| 57 | </listitem>
|
---|
| 58 | </itemizedlist>
|
---|
| 59 |
|
---|
| 60 | <bridgehead renderas="sect3">PostgreSQL Dependencies</bridgehead>
|
---|
| 61 |
|
---|
| 62 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[a7ff037] | 63 | <para role="optional">
|
---|
| 64 | <xref linkend="python2"/>,
|
---|
| 65 | <xref linkend="tcl"/>,
|
---|
| 66 | <xref linkend="openssl"/>,
|
---|
| 67 | <xref linkend="libxml2"/>,
|
---|
| 68 | <xref linkend="libxslt"/>,
|
---|
| 69 | <xref linkend="openldap"/>,
|
---|
| 70 | <xref linkend="linux-pam"/>,
|
---|
| 71 | <xref linkend="mitkrb"/> and
|
---|
| 72 | <ulink url="http://developer.apple.com/networking/bonjour/">Bonjour</ulink>
|
---|
| 73 | </para>
|
---|
[5aa1d3dd] | 74 |
|
---|
| 75 | <bridgehead renderas="sect4">Optional (To Regenerate Documentation)</bridgehead>
|
---|
[a7ff037] | 76 | <para role="optional">
|
---|
| 77 | <xref linkend="sgml-dtd"/>,
|
---|
| 78 | <xref linkend="docbook-dsssl"/>,
|
---|
| 79 | <xref linkend="openjade"/>, and
|
---|
| 80 | <xref linkend="perl-sgmlspm"/>
|
---|
| 81 | </para>
|
---|
[4ab91cd] | 82 |
|
---|
[3cb0c57] | 83 | <para condition="html" role="usernotes">User Notes:
|
---|
| 84 | <ulink url="&blfs-wiki;/postgresql"/></para>
|
---|
| 85 |
|
---|
[4ab91cd] | 86 | </sect2>
|
---|
| 87 |
|
---|
| 88 | <sect2 role="installation">
|
---|
| 89 | <title>Installation of PostgreSQL</title>
|
---|
| 90 |
|
---|
| 91 | <para>Install <application>PostgreSQL</application> with the
|
---|
| 92 | following commands: </para>
|
---|
[08254fc] | 93 |
|
---|
[62a6a73] | 94 | <screen><userinput>sed -i '/DEFAULT_PGSOCKET_DIR/s@/tmp@/run/postgresql@' src/include/pg_config_manual.h &&
|
---|
[faf325d] | 95 | ./configure --prefix=/usr \
|
---|
[e0cafc9] | 96 | --enable-thread-safety \
|
---|
| 97 | --docdir=/usr/share/doc/postgresql-&postgresql-version; &&
|
---|
[4ab91cd] | 98 | make</userinput></screen>
|
---|
[44e4099] | 99 |
|
---|
[782bf3d0] | 100 | <para>There are a number of programs in the
|
---|
[efc1e196] | 101 | <filename class="directory">contrib/</filename> directory. If you are going
|
---|
| 102 | to run this installation as a server and wish to build some of them, enter
|
---|
| 103 | <command>make -C contrib</command> or
|
---|
[83dd3169] | 104 | <command>make -C contrib/<replaceable><SUBDIR-NAME></replaceable></command> for each subdirectory.
|
---|
[782bf3d0] | 105 | </para>
|
---|
| 106 |
|
---|
[a0fa5dd] | 107 | <para>Tests must be run as an unprivileged user because they need to start a
|
---|
| 108 | temporary server and this is prevented as the root user. For the same reason,
|
---|
| 109 | you need to stop all PostgreSQL servers if any are running. If a previous
|
---|
| 110 | version of PostgreSQL is installed, it may be necessary to use
|
---|
| 111 | <emphasis>--disable-rpath</emphasis> with <emphasis>configure</emphasis> to
|
---|
| 112 | avoid failures, but <command>installing the binaries created using this
|
---|
| 113 | switch is not recommended</command>. To test the results, issue:
|
---|
[dd9e0c3] | 114 | <command>make check</command>.</para>
|
---|
[2df08064] | 115 |
|
---|
[4ab91cd] | 116 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[44e4099] | 117 |
|
---|
[e0cafc9] | 118 | <screen role="root"><userinput>make install &&
|
---|
[4f2c94fc] | 119 | make install-docs</userinput></screen>
|
---|
[11404f5] | 120 |
|
---|
[782bf3d0] | 121 | <para>If you made any of the <filename class="directory">contrib/</filename>
|
---|
| 122 | programs, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 123 |
|
---|
[83dd3169] | 124 | <screen role="nodump/"><userinput>make -C contrib/<replaceable><SUBDIR-NAME></replaceable> install</userinput></screen>
|
---|
[782bf3d0] | 125 |
|
---|
[2df08064] | 126 | <para><emphasis>If you only intend to use
|
---|
| 127 | <application>PostgreSQL</application> as a client to connect to a server on
|
---|
| 128 | another machine, your installation is complete and you should not run the
|
---|
| 129 | remaining commands.</emphasis></para>
|
---|
[efc1e196] | 130 |
|
---|
[a2957b7] | 131 | <!-- 'Upgrading' seems to only ever exist in the docs for *previous* version -->
|
---|
[99d528c] | 132 | <!-- Obsolete: only if upgrading for versions prior to 9 <note>
|
---|
[4ab91cd] | 133 | <para>If you are upgrading an existing system and are going to install
|
---|
| 134 | the new files over the old ones, then you should back up your data, shut
|
---|
| 135 | down the old server and follow the instructions in <ulink
|
---|
[a2957b7] | 136 | url="http://www.postgresql.org/docs/9.0/static/install-upgrading.html">the
|
---|
[4ab91cd] | 137 | official <application>PostgreSQL</application> documentation</ulink>.</para>
|
---|
[99d528c] | 138 | </note>-->
|
---|
[08254fc] | 139 |
|
---|
[4ab91cd] | 140 | <para>Initialize a database cluster with the following commands issued by the
|
---|
| 141 | <systemitem class="username">root</systemitem> user:</para>
|
---|
[08254fc] | 142 |
|
---|
[faf325d] | 143 | <screen role="root"><userinput>install -v -dm700 /srv/pgsql/data &&
|
---|
| 144 | install -v -dm755 /run/postgresql &&
|
---|
[5aa1d3dd] | 145 | groupadd -g 41 postgres &&
|
---|
| 146 | useradd -c "PostgreSQL Server" -g postgres -d /srv/pgsql/data \
|
---|
[b785ab29] | 147 | -u 41 postgres &&
|
---|
[faf325d] | 148 | chown -Rv postgres:postgres /srv/pgsql /run/postgresql &&
|
---|
[4ab91cd] | 149 | su - postgres -c '/usr/bin/initdb -D /srv/pgsql/data'</userinput></screen>
|
---|
[08254fc] | 150 |
|
---|
[4ab91cd] | 151 | <para>As the <systemitem class="username">root</systemitem> user, start the
|
---|
| 152 | database server with the following command:</para>
|
---|
[08254fc] | 153 |
|
---|
[ac38e9dc] | 154 | <screen role="root"><userinput>su - postgres -c '/usr/bin/postgres -D /srv/pgsql/data > \
|
---|
| 155 | /srv/pgsql/data/logfile 2>&1 &'</userinput></screen>
|
---|
[08254fc] | 156 |
|
---|
[4ab91cd] | 157 | <para>Still as user <systemitem class="username">root</systemitem>, create
|
---|
| 158 | a database and verify the installation:</para>
|
---|
[08254fc] | 159 |
|
---|
[4ab91cd] | 160 | <screen role="root"><userinput>su - postgres -c '/usr/bin/createdb test' &&
|
---|
[08254fc] | 161 | echo "create table t1 ( name varchar(20), state_province varchar(20) );" \
|
---|
| 162 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
| 163 | echo "insert into t1 values ('Billy', 'NewYork');" \
|
---|
| 164 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
| 165 | echo "insert into t1 values ('Evanidus', 'Quebec');" \
|
---|
| 166 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
| 167 | echo "insert into t1 values ('Jesse', 'Ontario');" \
|
---|
| 168 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
[4ab91cd] | 169 | echo "select * from t1;" | (su - postgres -c '/usr/bin/psql test')</userinput></screen>
|
---|
| 170 |
|
---|
| 171 | </sect2>
|
---|
| 172 |
|
---|
| 173 | <sect2 role="commands">
|
---|
| 174 | <title>Command Explanations</title>
|
---|
| 175 |
|
---|
[faf325d] | 176 | <para>
|
---|
[d49505a9] | 177 | <command>sed -i ...</command>: This sed changes server socket location
|
---|
[faf325d] | 178 | from <filename class="directory">/tmp</filename> to
|
---|
[99d528c] | 179 | <filename class="directory">/run/postgresql</filename><!-- and fix up the
|
---|
[782bf3d0] | 180 | regression tests to use <filename class="directory">/tmp</filename> so
|
---|
[99d528c] | 181 | that they can work reliably-->.
|
---|
[faf325d] | 182 | </para>
|
---|
| 183 |
|
---|
[76acb620] | 184 | <para><parameter>--docdir=/usr/share/doc/postgresql-&postgresql-version;</parameter>:
|
---|
[e0cafc9] | 185 | This switch puts the documentation in a versioned directory.</para>
|
---|
[08254fc] | 186 |
|
---|
[4ab91cd] | 187 | <para><parameter>--enable-thread-safety</parameter>: This switch makes the
|
---|
| 188 | client libraries thread-safe by allowing concurrent threads in
|
---|
[a7ff037] | 189 | <filename class="libraryfile">libpq</filename> and ECPG programs to safely
|
---|
[4ab91cd] | 190 | control their private connection handles.</para>
|
---|
| 191 |
|
---|
[a2957b7] | 192 | <para><option>--with-openssl</option>: build with support for
|
---|
| 193 | <application>OpenSSL</application> encrypted connections.</para>
|
---|
| 194 |
|
---|
[76acb620] | 195 | <para><option>--with-perl</option>: build the PL/Perl server-side language.
|
---|
| 196 | </para>
|
---|
| 197 |
|
---|
| 198 | <para><option>--with-python</option>: build the PL/Python server-side
|
---|
| 199 | language.</para>
|
---|
| 200 |
|
---|
[e0cafc9] | 201 | <para><option>--with-tcl</option>: build the PL/Tcl server-side language.</para>
|
---|
[76acb620] | 202 |
|
---|
[5aa1d3dd] | 203 | <para><command>groupadd ...</command>; <command>useradd ...</command>:
|
---|
| 204 | These commands add an unprivileged user and group to run the database
|
---|
| 205 | server.</para>
|
---|
[4ab91cd] | 206 |
|
---|
| 207 | <para><command>createdb test; create table t1; insert into t1 values...;
|
---|
| 208 | select * from t1</command>: Create a database, add a table to it, insert
|
---|
| 209 | some rows into the table and select them to verify that the installation
|
---|
| 210 | is working properly.</para>
|
---|
| 211 |
|
---|
| 212 | </sect2>
|
---|
| 213 |
|
---|
| 214 | <sect2 role="configuration">
|
---|
| 215 | <title>Configuring PostgreSQL</title>
|
---|
| 216 |
|
---|
| 217 | <sect3 id="postgresql-config">
|
---|
| 218 | <title>Config Files</title>
|
---|
| 219 |
|
---|
| 220 | <para><filename>$PGDATA/pg_ident.con</filename>,
|
---|
| 221 | <filename>$PGDATA/pg_hba.conf</filename> and
|
---|
| 222 | <filename>$PGDATA/postgresql.conf</filename></para>
|
---|
| 223 |
|
---|
| 224 | <indexterm zone="postgresql postgresql-config">
|
---|
| 225 | <primary sortas="e-A.PGDATA-pg_ident.con">$PGDATA/pg_indent.con</primary>
|
---|
| 226 | </indexterm>
|
---|
| 227 |
|
---|
| 228 | <indexterm zone="postgresql postgresql-config">
|
---|
| 229 | <primary sortas="e-A.PGDATA-pg_hba.conf">$PGDATA/pg_hba_conf</primary>
|
---|
| 230 | </indexterm>
|
---|
| 231 |
|
---|
| 232 | <indexterm zone="postgresql postgresql-config">
|
---|
| 233 | <primary sortas="e-A.PGDATA-postgresql.conf">$PGDATA/postgresql.conf</primary>
|
---|
| 234 | </indexterm>
|
---|
| 235 |
|
---|
| 236 | <para>The <envar>PGDATA</envar> environment variable is used to
|
---|
| 237 | distinguish database clusters from one another by setting it to
|
---|
| 238 | the value of the directory which contains the cluster desired.
|
---|
| 239 | The three configuration files exist in every <filename
|
---|
| 240 | class="directory">PGDATA/</filename> directory. Details on the
|
---|
| 241 | format of the files and the options that can be set in each can
|
---|
| 242 | be found in <ulink
|
---|
[a2957b7] | 243 | url="file:///usr/share/doc/postgresql-&postgresql-version;/html/index.html"/>.</para>
|
---|
[4ab91cd] | 244 |
|
---|
| 245 | </sect3>
|
---|
| 246 |
|
---|
| 247 | <sect3 id="postgresql-init">
|
---|
[608cda6] | 248 | <title>Systemd Units</title>
|
---|
| 249 |
|
---|
| 250 | <para>
|
---|
| 251 | To start the <command>postgresql</command> daemon at boot,
|
---|
| 252 | install the systemd unit from the <xref linkend="bootscripts"/>
|
---|
| 253 | package by running the following command as the
|
---|
| 254 | <systemitem class="username">root</systemitem> user:
|
---|
| 255 | </para>
|
---|
[4ab91cd] | 256 |
|
---|
| 257 | <indexterm zone="postgresql postgresql-init">
|
---|
| 258 | <primary sortas="f-postgresql">postgresql</primary>
|
---|
| 259 | </indexterm>
|
---|
| 260 |
|
---|
| 261 | <screen role="root"><userinput>make install-postgresql</userinput></screen>
|
---|
| 262 |
|
---|
| 263 | </sect3>
|
---|
| 264 |
|
---|
| 265 | </sect2>
|
---|
| 266 |
|
---|
| 267 | <sect2 role="content">
|
---|
| 268 | <title>Contents</title>
|
---|
| 269 |
|
---|
| 270 | <segmentedlist>
|
---|
| 271 | <segtitle>Installed Programs</segtitle>
|
---|
| 272 | <segtitle>Installed Libraries</segtitle>
|
---|
| 273 | <segtitle>Installed Directories</segtitle>
|
---|
| 274 |
|
---|
| 275 | <seglistitem>
|
---|
[ac38e9dc] | 276 | <seg>
|
---|
| 277 | clusterdb, createdb, createlang, createuser, dropdb, droplang,
|
---|
[2df08064] | 278 | dropuser, ecpg, initdb, pg_archivecleanup, pg_basebackup, pg_config,
|
---|
| 279 | pg_controldata, pg_ctl, pg_dump, pg_dumpall, pg_isready,
|
---|
| 280 | pg_receivexlog, pg_recvlogical, pg_resetxlog, pg_restore, pg_rewind,
|
---|
| 281 | pg_test_fsync, pg_test_timing, pg_upgrade, pg_xlogdump, pgbench,
|
---|
| 282 | pltcl_delmod, pltcl_listmod, pltcl_loadmod, postgres, postmaster
|
---|
| 283 | (deprecated), psql, reindexdb, vacuumdb, and optionally (in contrib/)
|
---|
| 284 | oid2name, pg_standby, vacuumlo, and many others
|
---|
[ac38e9dc] | 285 | </seg>
|
---|
| 286 | <seg>
|
---|
| 287 | libecpg.{so,a}, libecpg_compat.{so,a}, libpgcommon.a, libpgport.a,
|
---|
[2df08064] | 288 | libpgtypes.{so,a}, libpq.{so,a}, various charset modules, and
|
---|
| 289 | optionally programming language modules under /usr/lib/postgresql
|
---|
[ac38e9dc] | 290 | </seg>
|
---|
| 291 | <seg>
|
---|
| 292 | /usr/include/{libpq,postgresql},
|
---|
| 293 | /usr/lib/postgresql,
|
---|
[2df08064] | 294 | /usr/share/{doc/postgresql-&postgresql-version;,postgresql}, and
|
---|
[ac38e9dc] | 295 | /srv/pgsql
|
---|
| 296 | </seg>
|
---|
[4ab91cd] | 297 | </seglistitem>
|
---|
| 298 | </segmentedlist>
|
---|
| 299 |
|
---|
| 300 | <variablelist>
|
---|
| 301 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 302 | <?dbfo list-presentation="list"?>
|
---|
| 303 | <?dbhtml list-presentation="table"?>
|
---|
| 304 |
|
---|
| 305 | <varlistentry id="clusterdb">
|
---|
| 306 | <term><command>clusterdb</command></term>
|
---|
| 307 | <listitem>
|
---|
| 308 | <para>is a utility for reclustering tables in a
|
---|
| 309 | <application>PostgreSQL</application> database.</para>
|
---|
| 310 | <indexterm zone="postgresql clusterdb">
|
---|
| 311 | <primary sortas="b-clusterdb">clusterdb</primary>
|
---|
| 312 | </indexterm>
|
---|
| 313 | </listitem>
|
---|
| 314 | </varlistentry>
|
---|
| 315 |
|
---|
| 316 | <varlistentry id="createdb">
|
---|
| 317 | <term><command>createdb</command></term>
|
---|
| 318 | <listitem>
|
---|
| 319 | <para> creates a new <application>PostgreSQL</application>
|
---|
| 320 | database.</para>
|
---|
| 321 | <indexterm zone="postgresql createdb">
|
---|
| 322 | <primary sortas="b-createdb">createdb</primary>
|
---|
| 323 | </indexterm>
|
---|
| 324 | </listitem>
|
---|
| 325 | </varlistentry>
|
---|
| 326 |
|
---|
| 327 | <varlistentry id="createlang">
|
---|
| 328 | <term><command>createlang</command></term>
|
---|
| 329 | <listitem>
|
---|
| 330 | <para>defines a new <application>PostgreSQL</application> procedural
|
---|
| 331 | language.</para>
|
---|
| 332 | <indexterm zone="postgresql createlang">
|
---|
| 333 | <primary sortas="b-createlang">createlang</primary>
|
---|
| 334 | </indexterm>
|
---|
| 335 | </listitem>
|
---|
| 336 | </varlistentry>
|
---|
| 337 |
|
---|
| 338 | <varlistentry id="createuser">
|
---|
| 339 | <term><command>createuser</command></term>
|
---|
| 340 | <listitem>
|
---|
| 341 | <para>defines a new <application>PostgreSQL</application>
|
---|
| 342 | user account.</para>
|
---|
| 343 | <indexterm zone="postgresql createuser">
|
---|
| 344 | <primary sortas="b-createuser">createuser</primary>
|
---|
| 345 | </indexterm>
|
---|
| 346 | </listitem>
|
---|
| 347 | </varlistentry>
|
---|
| 348 |
|
---|
| 349 | <varlistentry id="dropdb">
|
---|
| 350 | <term><command>dropdb</command></term>
|
---|
| 351 | <listitem>
|
---|
| 352 | <para>removes a <application>PostgreSQL</application> database.</para>
|
---|
| 353 | <indexterm zone="postgresql dropdb">
|
---|
| 354 | <primary sortas="b-dropdb">dropdb</primary>
|
---|
| 355 | </indexterm>
|
---|
| 356 | </listitem>
|
---|
| 357 | </varlistentry>
|
---|
| 358 |
|
---|
| 359 | <varlistentry id="droplang">
|
---|
| 360 | <term><command>droplang</command></term>
|
---|
| 361 | <listitem>
|
---|
| 362 | <para>removes a <application>PostgreSQL</application> procedural
|
---|
| 363 | language.</para>
|
---|
| 364 | <indexterm zone="postgresql droplang">
|
---|
| 365 | <primary sortas="b-droplang">droplang</primary>
|
---|
| 366 | </indexterm>
|
---|
| 367 | </listitem>
|
---|
| 368 | </varlistentry>
|
---|
| 369 |
|
---|
| 370 | <varlistentry id="dropuser">
|
---|
| 371 | <term><command>dropuser</command></term>
|
---|
| 372 | <listitem>
|
---|
| 373 | <para>removes a <application>PostgreSQL</application>
|
---|
| 374 | user account.</para>
|
---|
| 375 | <indexterm zone="postgresql dropuser">
|
---|
| 376 | <primary sortas="b-dropuser">dropuser</primary>
|
---|
| 377 | </indexterm>
|
---|
| 378 | </listitem>
|
---|
| 379 | </varlistentry>
|
---|
| 380 |
|
---|
| 381 | <varlistentry id="ecpg">
|
---|
| 382 | <term><command>ecpg</command></term>
|
---|
| 383 | <listitem>
|
---|
| 384 | <para>is the embedded SQL preprocessor.</para>
|
---|
| 385 | <indexterm zone="postgresql ecpg">
|
---|
| 386 | <primary sortas="b-ecpg">ecpg</primary>
|
---|
| 387 | </indexterm>
|
---|
| 388 | </listitem>
|
---|
| 389 | </varlistentry>
|
---|
| 390 |
|
---|
| 391 | <varlistentry id="initdb">
|
---|
| 392 | <term><command>initdb</command></term>
|
---|
| 393 | <listitem>
|
---|
| 394 | <para>creates a new database cluster.</para>
|
---|
| 395 | <indexterm zone="postgresql initdb">
|
---|
| 396 | <primary sortas="b-initdb">initdb</primary>
|
---|
| 397 | </indexterm>
|
---|
| 398 | </listitem>
|
---|
| 399 | </varlistentry>
|
---|
| 400 |
|
---|
[782bf3d0] | 401 | <varlistentry id="oid2name">
|
---|
| 402 | <term><command>oid2name</command></term>
|
---|
| 403 | <listitem>
|
---|
| 404 | <para>resolves OIDs (Object IDs) and file nodes in a PostgreSQL data
|
---|
| 405 | directory.</para>
|
---|
| 406 | <indexterm zone="postgresql oid2name">
|
---|
| 407 | <primary sortas="b-oid2name">oid2name</primary>
|
---|
| 408 | </indexterm>
|
---|
| 409 | </listitem>
|
---|
| 410 | </varlistentry>
|
---|
| 411 |
|
---|
| 412 | <varlistentry id="pg_archivecleanup">
|
---|
| 413 | <term><command>pg_archivecleanup</command></term>
|
---|
| 414 | <listitem>
|
---|
| 415 | <para>clean up PostgreSQL WAL (write-ahead log) archive files.</para>
|
---|
| 416 | <indexterm zone="postgresql pg_archivecleanup">
|
---|
| 417 | <primary sortas="b-pg_archivecleanup">pg_archivecleanup</primary>
|
---|
| 418 | </indexterm>
|
---|
| 419 | </listitem>
|
---|
| 420 | </varlistentry>
|
---|
| 421 |
|
---|
[a2957b7] | 422 | <varlistentry id="pg_basebackup">
|
---|
| 423 | <term><command>pg_basebackup</command></term>
|
---|
[4ab91cd] | 424 | <listitem>
|
---|
[a2957b7] | 425 | <para>takes base backups of a running
|
---|
| 426 | <application>PostgreSQL</application> cluster.</para>
|
---|
| 427 | <indexterm zone="postgresql pg_basebackup">
|
---|
| 428 | <primary sortas="b-pg_basebackup">pg_basebackup</primary>
|
---|
[4ab91cd] | 429 | </indexterm>
|
---|
| 430 | </listitem>
|
---|
| 431 | </varlistentry>
|
---|
| 432 |
|
---|
| 433 | <varlistentry id="pg_config">
|
---|
| 434 | <term><command>pg_config</command></term>
|
---|
| 435 | <listitem>
|
---|
| 436 | <para>retrieves <application>PostgreSQL</application> version
|
---|
| 437 | information.</para>
|
---|
| 438 | <indexterm zone="postgresql pg_config">
|
---|
| 439 | <primary sortas="b-pg_config">pg_config</primary>
|
---|
| 440 | </indexterm>
|
---|
| 441 | </listitem>
|
---|
| 442 | </varlistentry>
|
---|
| 443 |
|
---|
| 444 | <varlistentry id="pg_controldata">
|
---|
| 445 | <term><command>pg_controldata</command></term>
|
---|
| 446 | <listitem>
|
---|
| 447 | <para>returns information initialized during
|
---|
| 448 | <command>initdb</command>, such as the catalog version and server
|
---|
| 449 | locale.</para>
|
---|
| 450 | <indexterm zone="postgresql pg_controldata">
|
---|
| 451 | <primary sortas="b-pg_controldata">pg_controldata</primary>
|
---|
| 452 | </indexterm>
|
---|
| 453 | </listitem>
|
---|
| 454 | </varlistentry>
|
---|
| 455 |
|
---|
| 456 | <varlistentry id="pg_ctl">
|
---|
| 457 | <term><command>pg_ctl</command></term>
|
---|
| 458 | <listitem>
|
---|
| 459 | <para>controls stopping and starting the database server.</para>
|
---|
| 460 | <indexterm zone="postgresql pg_ctl">
|
---|
| 461 | <primary sortas="b-pg_ctl">pg_ctl</primary>
|
---|
| 462 | </indexterm>
|
---|
| 463 | </listitem>
|
---|
| 464 | </varlistentry>
|
---|
| 465 |
|
---|
| 466 | <varlistentry id="pg_dump">
|
---|
| 467 | <term><command>pg_dump</command></term>
|
---|
| 468 | <listitem>
|
---|
| 469 | <para>dumps database data and metadata into scripts which are used
|
---|
| 470 | to recreate the database.</para>
|
---|
| 471 | <indexterm zone="postgresql pg_dump">
|
---|
| 472 | <primary sortas="b-pg_dump">pg_dump</primary>
|
---|
| 473 | </indexterm>
|
---|
| 474 | </listitem>
|
---|
| 475 | </varlistentry>
|
---|
| 476 |
|
---|
| 477 | <varlistentry id="pg_dumpall">
|
---|
| 478 | <term><command>pg_dumpall</command></term>
|
---|
| 479 | <listitem>
|
---|
| 480 | <para>recursively calls <command>pg_dump</command> for each
|
---|
| 481 | database in a cluster.</para>
|
---|
| 482 | <indexterm zone="postgresql pg_dumpall">
|
---|
| 483 | <primary sortas="b-pg_dumpall">pg_dumpall</primary>
|
---|
| 484 | </indexterm>
|
---|
| 485 | </listitem>
|
---|
| 486 | </varlistentry>
|
---|
| 487 |
|
---|
[782bf3d0] | 488 | <varlistentry id="pg_isready">
|
---|
| 489 | <term><command>pg_isready</command></term>
|
---|
| 490 | <listitem>
|
---|
| 491 | <para>check the connection status of a PostgreSQL server.</para>
|
---|
| 492 | <indexterm zone="postgresql pg_isready">
|
---|
| 493 | <primary sortas="b-pg_isready">pg_isready</primary>
|
---|
| 494 | </indexterm>
|
---|
| 495 | </listitem>
|
---|
| 496 | </varlistentry>
|
---|
| 497 |
|
---|
[8770a48] | 498 | <varlistentry id="pg_receivexlog">
|
---|
| 499 | <term><command>pg_receivexlog</command></term>
|
---|
| 500 | <listitem>
|
---|
| 501 | <para>
|
---|
| 502 | is used to stream transaction log from a running
|
---|
| 503 | PostgreSQL cluster.
|
---|
| 504 | </para>
|
---|
| 505 | <indexterm zone="postgresql pg_receivexlog">
|
---|
| 506 | <primary sortas="b-pg_receivexlog">pg_receivexlog</primary>
|
---|
| 507 | </indexterm>
|
---|
| 508 | </listitem>
|
---|
| 509 | </varlistentry>
|
---|
| 510 |
|
---|
[ac38e9dc] | 511 | <varlistentry id="pg_recvlogical">
|
---|
| 512 | <term><command>pg_recvlogical</command></term>
|
---|
| 513 | <listitem>
|
---|
| 514 | <para>controls PostgreSQL logical decoding streams.</para>
|
---|
| 515 | <indexterm zone="postgresql pg_recvlogical">
|
---|
| 516 | <primary sortas="b-pg_recvlogical">pg_recvlogical</primary>
|
---|
| 517 | </indexterm>
|
---|
| 518 | </listitem>
|
---|
| 519 | </varlistentry>
|
---|
| 520 |
|
---|
[4ab91cd] | 521 | <varlistentry id="pg_resetxlog">
|
---|
| 522 | <term><command>pg_resetxlog</command></term>
|
---|
| 523 | <listitem>
|
---|
| 524 | <para>clears the write-ahead log and optionally resets some
|
---|
| 525 | fields in the <filename>pg_control</filename> file.</para>
|
---|
| 526 | <indexterm zone="postgresql pg_resetxlog">
|
---|
| 527 | <primary sortas="b-pg_resetxlog">pg_resetxlog</primary>
|
---|
| 528 | </indexterm>
|
---|
| 529 | </listitem>
|
---|
| 530 | </varlistentry>
|
---|
| 531 |
|
---|
| 532 | <varlistentry id="pg_restore">
|
---|
| 533 | <term><command>pg_restore</command></term>
|
---|
| 534 | <listitem>
|
---|
| 535 | <para>creates databases from dump files created by
|
---|
| 536 | <command>pg_dump</command>.</para>
|
---|
| 537 | <indexterm zone="postgresql pg_restore">
|
---|
| 538 | <primary sortas="b-pg_restore">pg_restore</primary>
|
---|
| 539 | </indexterm>
|
---|
| 540 | </listitem>
|
---|
| 541 | </varlistentry>
|
---|
| 542 |
|
---|
[2df08064] | 543 | <varlistentry id="pg_rewind">
|
---|
| 544 | <term><command>pg_rewind</command></term>
|
---|
| 545 | <listitem>
|
---|
| 546 | <para>synchronizes a PostgreSQL data directory with another data
|
---|
| 547 | directory that was forked from the first one.</para>
|
---|
| 548 | <indexterm zone="postgresql pg_rewind">
|
---|
| 549 | <primary sortas="b-pg_rewind">pg_rewind</primary>
|
---|
| 550 | </indexterm>
|
---|
| 551 | </listitem>
|
---|
| 552 | </varlistentry>
|
---|
| 553 |
|
---|
[782bf3d0] | 554 | <varlistentry id="pg_standby">
|
---|
| 555 | <term><command>pg_standby</command></term>
|
---|
| 556 | <listitem>
|
---|
| 557 | <para>supports the creation of a PostgreSQL warm standby
|
---|
| 558 | server.</para>
|
---|
| 559 | <indexterm zone="postgresql pg_standby">
|
---|
| 560 | <primary sortas="b-pg_standby">pg_standby</primary>
|
---|
| 561 | </indexterm>
|
---|
| 562 | </listitem>
|
---|
| 563 | </varlistentry>
|
---|
| 564 |
|
---|
| 565 | <varlistentry id="pg_test_fsync">
|
---|
| 566 | <term><command>pg_test_fsync</command></term>
|
---|
| 567 | <listitem>
|
---|
| 568 | <para>determine fastest wal_sync method for PostgreSQL.</para>
|
---|
| 569 | <indexterm zone="postgresql pg_test_fsync">
|
---|
| 570 | <primary sortas="b-pg_test_fsync">pg_test_fsync</primary>
|
---|
| 571 | </indexterm>
|
---|
| 572 | </listitem>
|
---|
| 573 | </varlistentry>
|
---|
| 574 |
|
---|
| 575 | <varlistentry id="pg_test_timing">
|
---|
| 576 | <term><command>pg_test_timing</command></term>
|
---|
| 577 | <listitem>
|
---|
| 578 | <para>measure timing overhead.</para>
|
---|
| 579 | <indexterm zone="postgresql pg_test_timing">
|
---|
| 580 | <primary sortas="b-pg_test_timing">pg_test_timing</primary>
|
---|
| 581 | </indexterm>
|
---|
| 582 | </listitem>
|
---|
| 583 | </varlistentry>
|
---|
| 584 |
|
---|
| 585 | <varlistentry id="pg_upgrade">
|
---|
| 586 | <term><command>pg_upgrade</command></term>
|
---|
| 587 | <listitem>
|
---|
| 588 | <para>upgrade a PostgreSQL server instance.</para>
|
---|
| 589 | <indexterm zone="postgresql pg_upgrade">
|
---|
| 590 | <primary sortas="b-pg_upgrade">pg_upgrade</primary>
|
---|
| 591 | </indexterm>
|
---|
| 592 | </listitem>
|
---|
| 593 | </varlistentry>
|
---|
| 594 |
|
---|
| 595 | <varlistentry id="pg_xlogdump">
|
---|
| 596 | <term><command>pg_xlogdump</command></term>
|
---|
| 597 | <listitem>
|
---|
| 598 | <para>display a human-readable rendering of the write-ahead log of a
|
---|
| 599 | PostgreSQL database cluster.</para>
|
---|
| 600 | <indexterm zone="postgresql pg_xlogdump">
|
---|
| 601 | <primary sortas="b-pg_xlogdump">pg_xlogdump</primary>
|
---|
| 602 | </indexterm>
|
---|
| 603 | </listitem>
|
---|
| 604 | </varlistentry>
|
---|
| 605 |
|
---|
| 606 | <varlistentry id="pgbench">
|
---|
| 607 | <term><command>pgbench</command></term>
|
---|
| 608 | <listitem>
|
---|
| 609 | <para>run a benchmark test on PostgreSQL.</para>
|
---|
| 610 | <indexterm zone="postgresql pgbench">
|
---|
| 611 | <primary sortas="b-pgbench">pgbench</primary>
|
---|
| 612 | </indexterm>
|
---|
| 613 | </listitem>
|
---|
| 614 | </varlistentry>
|
---|
| 615 |
|
---|
[4ab91cd] | 616 | <varlistentry id="pltcl_delmod">
|
---|
| 617 | <term><command>pltcl_delmod</command></term>
|
---|
| 618 | <listitem>
|
---|
| 619 | <para>is a support script used to delete a module from a
|
---|
| 620 | PL/<application>Tcl</application> table. The command
|
---|
| 621 | requires the <ulink
|
---|
[a754ee2b] | 622 | url="http://flightaware.github.io/Pgtcl/">Pgtcl</ulink>
|
---|
[4ab91cd] | 623 | package to be installed also.</para>
|
---|
| 624 | <indexterm zone="postgresql pltcl_delmod">
|
---|
| 625 | <primary sortas="b-pltcl_delmod">pltcl_delmod</primary>
|
---|
| 626 | </indexterm>
|
---|
| 627 | </listitem>
|
---|
| 628 | </varlistentry>
|
---|
| 629 |
|
---|
| 630 | <varlistentry id="pltcl_listmod">
|
---|
| 631 | <term><command>pltcl_listmod</command></term>
|
---|
| 632 | <listitem>
|
---|
| 633 | <para>is a support script used to list the modules in a
|
---|
| 634 | PL/<application>Tcl</application> table. The command
|
---|
| 635 | requires the <ulink
|
---|
| 636 | url="http://gborg.postgresql.org/project/pgtcl/">Pgtcl</ulink>
|
---|
| 637 | package to be installed also.</para>
|
---|
| 638 | <indexterm zone="postgresql pltcl_listmod">
|
---|
| 639 | <primary sortas="b-pltcl_listmod">pltcl_listmod</primary>
|
---|
| 640 | </indexterm>
|
---|
| 641 | </listitem>
|
---|
| 642 | </varlistentry>
|
---|
| 643 |
|
---|
| 644 | <varlistentry id="pltcl_loadmod">
|
---|
| 645 | <term><command>pltcl_loadmod</command></term>
|
---|
| 646 | <listitem>
|
---|
| 647 | <para>is a support script used to load a module into a
|
---|
| 648 | PL/<application>Tcl</application> table. The command
|
---|
| 649 | requires the <ulink
|
---|
| 650 | url="http://gborg.postgresql.org/project/pgtcl/">Pgtcl</ulink>
|
---|
| 651 | package to be installed also.</para>
|
---|
| 652 | <indexterm zone="postgresql pltcl_loadmod">
|
---|
| 653 | <primary sortas="b-pltcl_loadmod">pltcl_loadmod</primary>
|
---|
| 654 | </indexterm>
|
---|
| 655 | </listitem>
|
---|
| 656 | </varlistentry>
|
---|
| 657 |
|
---|
| 658 | <varlistentry id="postgres">
|
---|
| 659 | <term><command>postgres</command></term>
|
---|
| 660 | <listitem>
|
---|
[ac38e9dc] | 661 | <para>is the PostgreSQL database server.</para>
|
---|
[4ab91cd] | 662 | <indexterm zone="postgresql postgres">
|
---|
| 663 | <primary sortas="b-postgres">postgres</primary>
|
---|
| 664 | </indexterm>
|
---|
| 665 | </listitem>
|
---|
| 666 | </varlistentry>
|
---|
| 667 |
|
---|
| 668 | <varlistentry id="postmaster">
|
---|
| 669 | <term><command>postmaster</command></term>
|
---|
| 670 | <listitem>
|
---|
[ac38e9dc] | 671 | <para>(deprecated, a symlink to <command>postgres</command>) is a
|
---|
| 672 | multi-user database daemon.</para>
|
---|
[4ab91cd] | 673 | <indexterm zone="postgresql postmaster">
|
---|
| 674 | <primary sortas="b-postmaster">postmaster</primary>
|
---|
| 675 | </indexterm>
|
---|
| 676 | </listitem>
|
---|
| 677 | </varlistentry>
|
---|
| 678 |
|
---|
| 679 | <varlistentry id="psql">
|
---|
| 680 | <term><command>psql</command></term>
|
---|
| 681 | <listitem>
|
---|
| 682 | <para>is a console based database shell.</para>
|
---|
| 683 | <indexterm zone="postgresql psql">
|
---|
| 684 | <primary sortas="b-psql">psql</primary>
|
---|
| 685 | </indexterm>
|
---|
| 686 | </listitem>
|
---|
| 687 | </varlistentry>
|
---|
| 688 |
|
---|
[aaeca54] | 689 | <varlistentry id="reindexdb">
|
---|
| 690 | <term><command>reindexdb</command></term>
|
---|
| 691 | <listitem>
|
---|
| 692 | <para>is a utility for rebuilding indexes in a database.</para>
|
---|
[621a551] | 693 | <indexterm zone="postgresql reindexdb">
|
---|
| 694 | <primary sortas="b-reindexdb">reindexdb</primary>
|
---|
[aaeca54] | 695 | </indexterm>
|
---|
| 696 | </listitem>
|
---|
| 697 | </varlistentry>
|
---|
| 698 |
|
---|
[4ab91cd] | 699 | <varlistentry id="vacuumdb">
|
---|
| 700 | <term><command>vacuumdb</command></term>
|
---|
| 701 | <listitem>
|
---|
| 702 | <para>compacts databases and generates statistics for the query
|
---|
| 703 | analyzer.</para>
|
---|
| 704 | <indexterm zone="postgresql vacuumdb">
|
---|
| 705 | <primary sortas="b-vacuumdb">vacuumdb</primary>
|
---|
| 706 | </indexterm>
|
---|
[782bf3d0] | 707 | </listitem>
|
---|
| 708 | </varlistentry>
|
---|
| 709 |
|
---|
| 710 | <varlistentry id="vacuumlo">
|
---|
| 711 | <term><command>vacuumlo</command></term>
|
---|
| 712 | <listitem>
|
---|
| 713 | <para>remove orphaned large objects from a PostgreSQL database.</para>
|
---|
| 714 | <indexterm zone="postgresql vacuumlo">
|
---|
| 715 | <primary sortas="b-vacuumlo">vacuumlo</primary>
|
---|
| 716 | </indexterm>
|
---|
[4ab91cd] | 717 | </listitem>
|
---|
| 718 | </varlistentry>
|
---|
| 719 |
|
---|
[76acb620] | 720 | <varlistentry id="libecpg">
|
---|
| 721 | <term><filename class='libraryfile'>libecpg.{so,a}</filename></term>
|
---|
| 722 | <listitem>
|
---|
| 723 | <para>contains functions to support embedded SQL in C programs.</para>
|
---|
| 724 | <indexterm zone="postgresql libecpg">
|
---|
| 725 | <primary sortas="c-libecpg">libecpg.{so,a}</primary>
|
---|
| 726 | </indexterm>
|
---|
| 727 | </listitem>
|
---|
| 728 | </varlistentry>
|
---|
| 729 |
|
---|
| 730 | <varlistentry id="libecpg_compat">
|
---|
| 731 | <term><filename class='libraryfile'>libecpg_compat.{so,a}</filename></term>
|
---|
| 732 | <listitem>
|
---|
[c4b0455] | 733 | <para>is the ecpg compatibility library.</para>
|
---|
[76acb620] | 734 | <indexterm zone="postgresql libecpg_compat">
|
---|
| 735 | <primary sortas="c-libecpg_compat">libecpg_compat.{so,a}</primary>
|
---|
| 736 | </indexterm>
|
---|
| 737 | </listitem>
|
---|
| 738 | </varlistentry>
|
---|
| 739 |
|
---|
| 740 | <varlistentry id="libgport">
|
---|
| 741 | <term><filename class='libraryfile'>libgport.a</filename></term>
|
---|
| 742 | <listitem>
|
---|
| 743 | <para>is the port-specific subsystem of the Postgres backend.</para>
|
---|
| 744 | <indexterm zone="postgresql libgport">
|
---|
| 745 | <primary sortas="c-libgport">libgport.a</primary>
|
---|
| 746 | </indexterm>
|
---|
| 747 | </listitem>
|
---|
| 748 | </varlistentry>
|
---|
| 749 |
|
---|
| 750 | <varlistentry id="libpgtypes">
|
---|
| 751 | <term><filename class='libraryfile'>libpgtypes.{so,a}</filename></term>
|
---|
| 752 | <listitem>
|
---|
| 753 | <para>contains functions for dealing with Postgres data types.</para>
|
---|
| 754 | <indexterm zone="postgresql libpgtypes">
|
---|
| 755 | <primary sortas="c-libpgtypes">libpgtypes.{so,a}</primary>
|
---|
| 756 | </indexterm>
|
---|
| 757 | </listitem>
|
---|
| 758 | </varlistentry>
|
---|
| 759 |
|
---|
| 760 | <varlistentry id="libpq">
|
---|
| 761 | <term><filename class='libraryfile'>libpq.{so,a}</filename></term>
|
---|
| 762 | <listitem>
|
---|
| 763 | <para>is the C programmer's API to Postgres.</para>
|
---|
| 764 | <indexterm zone="postgresql libpq">
|
---|
| 765 | <primary sortas="c-libpq">libpq.{so,a}</primary>
|
---|
| 766 | </indexterm>
|
---|
| 767 | </listitem>
|
---|
| 768 | </varlistentry>
|
---|
| 769 |
|
---|
[4ab91cd] | 770 | </variablelist>
|
---|
| 771 |
|
---|
| 772 | </sect2>
|
---|
[458342f] | 773 |
|
---|
| 774 | </sect1>
|
---|