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