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