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