[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 |
|
---|
[904f4c45] | 7 | <!ENTITY postgresql-download-http "http://gd.tuwien.ac.at/db/postgresql/source/v&postgresql-version;/postgresql-&postgresql-version;.tar.bz2">
|
---|
| 8 | <!ENTITY postgresql-download-ftp "ftp://ftp5.us.postgresql.org/pub/PostgreSQL/source/v&postgresql-version;/postgresql-&postgresql-version;.tar.bz2">
|
---|
[e0cafc9] | 9 | <!ENTITY postgresql-md5sum "8c4c32a4abe8cf61b02c8366181ede50">
|
---|
| 10 | <!ENTITY postgresql-size "15.4 MB">
|
---|
| 11 | <!ENTITY postgresql-buildsize "331 MB (additional 143 MB to run the testsuite)">
|
---|
| 12 | <!ENTITY postgresql-time "1.7 SBU (additional 0.1 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 |
|
---|
[99d8124d] | 42 | &lfs72_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"/>,
|
---|
[4e9561aa] | 76 | <!-- link is dead, no other suitable GSSAPI links found
|
---|
| 77 | <ulink url="http://www.pdc.kth.se/kth-krb/">krb4</ulink>, -->
|
---|
[7fdeb26] | 78 | <xref linkend="mitkrb"/> and
|
---|
[5aa1d3dd] | 79 | <ulink url="http://developer.apple.com/networking/bonjour/">Bonjour</ulink></para>
|
---|
| 80 |
|
---|
| 81 | <bridgehead renderas="sect4">Optional (To Regenerate Documentation)</bridgehead>
|
---|
| 82 | <para role="optional"><xref linkend="sgml-dtd"/>,
|
---|
| 83 | <xref linkend="docbook-dsssl"/>,
|
---|
| 84 | <xref linkend="openjade"/>, and
|
---|
| 85 | <xref linkend="perl-sgmlspm"/></para>
|
---|
[4ab91cd] | 86 |
|
---|
[3cb0c57] | 87 | <para condition="html" role="usernotes">User Notes:
|
---|
| 88 | <ulink url="&blfs-wiki;/postgresql"/></para>
|
---|
| 89 |
|
---|
[4ab91cd] | 90 | </sect2>
|
---|
| 91 |
|
---|
| 92 | <sect2 role="installation">
|
---|
| 93 | <title>Installation of PostgreSQL</title>
|
---|
| 94 |
|
---|
| 95 | <para>Install <application>PostgreSQL</application> with the
|
---|
| 96 | following commands: </para>
|
---|
[08254fc] | 97 |
|
---|
[76acb620] | 98 | <!-- commented : regeneration is unnecessary, and we don't tell people the
|
---|
| 99 | command to do it.
|
---|
| 100 | <para>If you intend to regenerate the html documentation, issue the
|
---|
| 101 | following command:</para>
|
---|
[5aa1d3dd] | 102 | <screen><userinput>sed -i "s|dsssl-stylesheets|& \\\\\n sgml/docbook/&-&docbook-dsssl-version;|" \
|
---|
[76acb620] | 103 | configure</userinput></screen>-->
|
---|
| 104 |
|
---|
| 105 | <para>Now configure and build the package:</para>
|
---|
| 106 |
|
---|
[e0cafc9] | 107 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 108 | --enable-thread-safety \
|
---|
| 109 | --docdir=/usr/share/doc/postgresql-&postgresql-version; &&
|
---|
[4ab91cd] | 110 | make</userinput></screen>
|
---|
[44e4099] | 111 |
|
---|
[acbce59] | 112 | <para>To test the results, issue: <command>make check</command>.</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 &&
|
---|
[76acb620] | 117 | make install-docs &&
|
---|
| 118 | chown -v root:root /usr/share/doc/postgresql-&postgresql-version;/html/*</userinput></screen>
|
---|
[11404f5] | 119 |
|
---|
[a2957b7] | 120 | <!-- 'Upgrading' seems to only ever exist in the docs for *previous* version -->
|
---|
[4ab91cd] | 121 | <note>
|
---|
| 122 | <para>If you are upgrading an existing system and are going to install
|
---|
| 123 | the new files over the old ones, then you should back up your data, shut
|
---|
| 124 | down the old server and follow the instructions in <ulink
|
---|
[a2957b7] | 125 | url="http://www.postgresql.org/docs/9.0/static/install-upgrading.html">the
|
---|
[4ab91cd] | 126 | official <application>PostgreSQL</application> documentation</ulink>.</para>
|
---|
| 127 | </note>
|
---|
[08254fc] | 128 |
|
---|
[4ab91cd] | 129 | <para>Initialize a database cluster with the following commands issued by the
|
---|
| 130 | <systemitem class="username">root</systemitem> user:</para>
|
---|
[08254fc] | 131 |
|
---|
[aaeca54] | 132 | <screen role="root"><userinput>install -v -m700 -d /srv/pgsql/data &&
|
---|
[5aa1d3dd] | 133 | groupadd -g 41 postgres &&
|
---|
| 134 | useradd -c "PostgreSQL Server" -g postgres -d /srv/pgsql/data \
|
---|
[b785ab29] | 135 | -u 41 postgres &&
|
---|
[44e4099] | 136 | chown -v postgres /srv/pgsql/data &&
|
---|
[4ab91cd] | 137 | su - postgres -c '/usr/bin/initdb -D /srv/pgsql/data'</userinput></screen>
|
---|
[08254fc] | 138 |
|
---|
[4ab91cd] | 139 | <para>As the <systemitem class="username">root</systemitem> user, start the
|
---|
| 140 | database server with the following command:</para>
|
---|
[08254fc] | 141 |
|
---|
[4ab91cd] | 142 | <screen role="root"><userinput>su - postgres -c '/usr/bin/postmaster -D /srv/pgsql/data > \
|
---|
| 143 | /srv/pgsql/data/logfile 2>&1 &'</userinput></screen>
|
---|
[08254fc] | 144 |
|
---|
[4ab91cd] | 145 | <para>Still as user <systemitem class="username">root</systemitem>, create
|
---|
| 146 | a database and verify the installation:</para>
|
---|
[08254fc] | 147 |
|
---|
[4ab91cd] | 148 | <screen role="root"><userinput>su - postgres -c '/usr/bin/createdb test' &&
|
---|
[08254fc] | 149 | echo "create table t1 ( name varchar(20), state_province varchar(20) );" \
|
---|
| 150 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
| 151 | echo "insert into t1 values ('Billy', 'NewYork');" \
|
---|
| 152 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
| 153 | echo "insert into t1 values ('Evanidus', 'Quebec');" \
|
---|
| 154 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
| 155 | echo "insert into t1 values ('Jesse', 'Ontario');" \
|
---|
| 156 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
[4ab91cd] | 157 | echo "select * from t1;" | (su - postgres -c '/usr/bin/psql test')</userinput></screen>
|
---|
| 158 |
|
---|
| 159 | </sect2>
|
---|
| 160 |
|
---|
| 161 | <sect2 role="commands">
|
---|
| 162 | <title>Command Explanations</title>
|
---|
| 163 |
|
---|
[76acb620] | 164 | <!-- commented : regeneration is unnecessary, and we don't tell people the
|
---|
| 165 | command to do it.
|
---|
[5aa1d3dd] | 166 | <para><command>sed -i "s|dsssl-stylesheets|..."</command>: This command
|
---|
[4ab91cd] | 167 | puts an extra line in the <command>configure</command> script so that the
|
---|
[76acb620] | 168 | BLFS installed version of the DSSSL stylesheets are discovered.</para> -->
|
---|
| 169 |
|
---|
| 170 | <para><parameter>--docdir=/usr/share/doc/postgresql-&postgresql-version;</parameter>:
|
---|
[e0cafc9] | 171 | This switch puts the documentation in a versioned directory.</para>
|
---|
[08254fc] | 172 |
|
---|
[4ab91cd] | 173 | <para><parameter>--enable-thread-safety</parameter>: This switch makes the
|
---|
| 174 | client libraries thread-safe by allowing concurrent threads in
|
---|
| 175 | <filename class='libraryfile'>libpq</filename> and ECPG programs to safely
|
---|
| 176 | control their private connection handles.</para>
|
---|
| 177 |
|
---|
[a2957b7] | 178 | <para><option>--with-openssl</option>: build with support for
|
---|
| 179 | <application>OpenSSL</application> encrypted connections.</para>
|
---|
| 180 |
|
---|
[76acb620] | 181 | <para><option>--with-perl</option>: build the PL/Perl server-side language.
|
---|
| 182 | </para>
|
---|
| 183 |
|
---|
| 184 | <para><option>--with-python</option>: build the PL/Python server-side
|
---|
| 185 | language.</para>
|
---|
| 186 |
|
---|
[e0cafc9] | 187 | <para><option>--with-tcl</option>: build the PL/Tcl server-side language.</para>
|
---|
[76acb620] | 188 |
|
---|
[a2957b7] | 189 | <para><command>chown -v root:root /usr/share/doc/postgresql-&postgresql-version;/html/*</command>:
|
---|
[5aa1d3dd] | 190 | This command corrects the improper ownership of documentation files.</para>
|
---|
[4ab91cd] | 191 |
|
---|
[5aa1d3dd] | 192 | <para><command>groupadd ...</command>; <command>useradd ...</command>:
|
---|
| 193 | These commands add an unprivileged user and group to run the database
|
---|
| 194 | server.</para>
|
---|
[4ab91cd] | 195 |
|
---|
| 196 | <para><command>createdb test; create table t1; insert into t1 values...;
|
---|
| 197 | select * from t1</command>: Create a database, add a table to it, insert
|
---|
| 198 | some rows into the table and select them to verify that the installation
|
---|
| 199 | is working properly.</para>
|
---|
| 200 |
|
---|
| 201 | </sect2>
|
---|
| 202 |
|
---|
| 203 | <sect2 role="configuration">
|
---|
| 204 | <title>Configuring PostgreSQL</title>
|
---|
| 205 |
|
---|
| 206 | <sect3 id="postgresql-config">
|
---|
| 207 | <title>Config Files</title>
|
---|
| 208 |
|
---|
| 209 | <para><filename>$PGDATA/pg_ident.con</filename>,
|
---|
| 210 | <filename>$PGDATA/pg_hba.conf</filename> and
|
---|
| 211 | <filename>$PGDATA/postgresql.conf</filename></para>
|
---|
| 212 |
|
---|
| 213 | <indexterm zone="postgresql postgresql-config">
|
---|
| 214 | <primary sortas="e-A.PGDATA-pg_ident.con">$PGDATA/pg_indent.con</primary>
|
---|
| 215 | </indexterm>
|
---|
| 216 |
|
---|
| 217 | <indexterm zone="postgresql postgresql-config">
|
---|
| 218 | <primary sortas="e-A.PGDATA-pg_hba.conf">$PGDATA/pg_hba_conf</primary>
|
---|
| 219 | </indexterm>
|
---|
| 220 |
|
---|
| 221 | <indexterm zone="postgresql postgresql-config">
|
---|
| 222 | <primary sortas="e-A.PGDATA-postgresql.conf">$PGDATA/postgresql.conf</primary>
|
---|
| 223 | </indexterm>
|
---|
| 224 |
|
---|
| 225 | <para>The <envar>PGDATA</envar> environment variable is used to
|
---|
| 226 | distinguish database clusters from one another by setting it to
|
---|
| 227 | the value of the directory which contains the cluster desired.
|
---|
| 228 | The three configuration files exist in every <filename
|
---|
| 229 | class="directory">PGDATA/</filename> directory. Details on the
|
---|
| 230 | format of the files and the options that can be set in each can
|
---|
| 231 | be found in <ulink
|
---|
[a2957b7] | 232 | url="file:///usr/share/doc/postgresql-&postgresql-version;/html/index.html"/>.</para>
|
---|
[4ab91cd] | 233 |
|
---|
| 234 | </sect3>
|
---|
| 235 |
|
---|
| 236 | <sect3 id="postgresql-init">
|
---|
| 237 | <title>Boot Script</title>
|
---|
| 238 |
|
---|
| 239 | <para>Install the <filename>/etc/rc.d/init.d/postgresql</filename>
|
---|
| 240 | init script included in the
|
---|
[5254d12] | 241 | <xref linkend="bootscripts"/> package.</para>
|
---|
[4ab91cd] | 242 |
|
---|
| 243 | <indexterm zone="postgresql postgresql-init">
|
---|
| 244 | <primary sortas="f-postgresql">postgresql</primary>
|
---|
| 245 | </indexterm>
|
---|
| 246 |
|
---|
| 247 | <screen role="root"><userinput>make install-postgresql</userinput></screen>
|
---|
| 248 |
|
---|
| 249 | </sect3>
|
---|
| 250 |
|
---|
| 251 | </sect2>
|
---|
| 252 |
|
---|
| 253 | <sect2 role="content">
|
---|
| 254 | <title>Contents</title>
|
---|
| 255 |
|
---|
| 256 | <segmentedlist>
|
---|
| 257 | <segtitle>Installed Programs</segtitle>
|
---|
| 258 | <segtitle>Installed Libraries</segtitle>
|
---|
| 259 | <segtitle>Installed Directories</segtitle>
|
---|
| 260 |
|
---|
| 261 | <seglistitem>
|
---|
| 262 | <seg>clusterdb, createdb, createlang, createuser, dropdb, droplang,
|
---|
[a2957b7] | 263 | dropuser, ecpg, initdb, pg_basebackup, pg_config, pg_controldata, pg_ctl,
|
---|
[4ab91cd] | 264 | pg_dump, pg_dumpall, pg_resetxlog, pg_restore, pltcl_delmod,
|
---|
[aaeca54] | 265 | pltcl_listmod, pltcl_loadmod, postgres, postmaster, psql,
|
---|
| 266 | reindexdb, and vacuumdb</seg>
|
---|
[3cb0c57] | 267 | <seg>libecpg.{so,a}, libecpg_compat.{so,a}, libpgport.a, libpgtypes.{so,a},
|
---|
[a2957b7] | 268 | libpq.{so,a}, and various charset (and optionally, programming language)
|
---|
| 269 | modules.</seg>
|
---|
[4ab91cd] | 270 | <seg>/srv/pgsql, /usr/include/libpq, /usr/include/postgresql,
|
---|
[a2957b7] | 271 | /usr/lib/postgresql, /usr/share/doc/postgresql-&postgresql-version;, and
|
---|
[4ab91cd] | 272 | /usr/share/postgresql</seg>
|
---|
| 273 | </seglistitem>
|
---|
| 274 | </segmentedlist>
|
---|
| 275 |
|
---|
| 276 | <variablelist>
|
---|
| 277 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 278 | <?dbfo list-presentation="list"?>
|
---|
| 279 | <?dbhtml list-presentation="table"?>
|
---|
| 280 |
|
---|
| 281 | <varlistentry id="clusterdb">
|
---|
| 282 | <term><command>clusterdb</command></term>
|
---|
| 283 | <listitem>
|
---|
| 284 | <para>is a utility for reclustering tables in a
|
---|
| 285 | <application>PostgreSQL</application> database.</para>
|
---|
| 286 | <indexterm zone="postgresql clusterdb">
|
---|
| 287 | <primary sortas="b-clusterdb">clusterdb</primary>
|
---|
| 288 | </indexterm>
|
---|
| 289 | </listitem>
|
---|
| 290 | </varlistentry>
|
---|
| 291 |
|
---|
| 292 | <varlistentry id="createdb">
|
---|
| 293 | <term><command>createdb</command></term>
|
---|
| 294 | <listitem>
|
---|
| 295 | <para> creates a new <application>PostgreSQL</application>
|
---|
| 296 | database.</para>
|
---|
| 297 | <indexterm zone="postgresql createdb">
|
---|
| 298 | <primary sortas="b-createdb">createdb</primary>
|
---|
| 299 | </indexterm>
|
---|
| 300 | </listitem>
|
---|
| 301 | </varlistentry>
|
---|
| 302 |
|
---|
| 303 | <varlistentry id="createlang">
|
---|
| 304 | <term><command>createlang</command></term>
|
---|
| 305 | <listitem>
|
---|
| 306 | <para>defines a new <application>PostgreSQL</application> procedural
|
---|
| 307 | language.</para>
|
---|
| 308 | <indexterm zone="postgresql createlang">
|
---|
| 309 | <primary sortas="b-createlang">createlang</primary>
|
---|
| 310 | </indexterm>
|
---|
| 311 | </listitem>
|
---|
| 312 | </varlistentry>
|
---|
| 313 |
|
---|
| 314 | <varlistentry id="createuser">
|
---|
| 315 | <term><command>createuser</command></term>
|
---|
| 316 | <listitem>
|
---|
| 317 | <para>defines a new <application>PostgreSQL</application>
|
---|
| 318 | user account.</para>
|
---|
| 319 | <indexterm zone="postgresql createuser">
|
---|
| 320 | <primary sortas="b-createuser">createuser</primary>
|
---|
| 321 | </indexterm>
|
---|
| 322 | </listitem>
|
---|
| 323 | </varlistentry>
|
---|
| 324 |
|
---|
| 325 | <varlistentry id="dropdb">
|
---|
| 326 | <term><command>dropdb</command></term>
|
---|
| 327 | <listitem>
|
---|
| 328 | <para>removes a <application>PostgreSQL</application> database.</para>
|
---|
| 329 | <indexterm zone="postgresql dropdb">
|
---|
| 330 | <primary sortas="b-dropdb">dropdb</primary>
|
---|
| 331 | </indexterm>
|
---|
| 332 | </listitem>
|
---|
| 333 | </varlistentry>
|
---|
| 334 |
|
---|
| 335 | <varlistentry id="droplang">
|
---|
| 336 | <term><command>droplang</command></term>
|
---|
| 337 | <listitem>
|
---|
| 338 | <para>removes a <application>PostgreSQL</application> procedural
|
---|
| 339 | language.</para>
|
---|
| 340 | <indexterm zone="postgresql droplang">
|
---|
| 341 | <primary sortas="b-droplang">droplang</primary>
|
---|
| 342 | </indexterm>
|
---|
| 343 | </listitem>
|
---|
| 344 | </varlistentry>
|
---|
| 345 |
|
---|
| 346 | <varlistentry id="dropuser">
|
---|
| 347 | <term><command>dropuser</command></term>
|
---|
| 348 | <listitem>
|
---|
| 349 | <para>removes a <application>PostgreSQL</application>
|
---|
| 350 | user account.</para>
|
---|
| 351 | <indexterm zone="postgresql dropuser">
|
---|
| 352 | <primary sortas="b-dropuser">dropuser</primary>
|
---|
| 353 | </indexterm>
|
---|
| 354 | </listitem>
|
---|
| 355 | </varlistentry>
|
---|
| 356 |
|
---|
| 357 | <varlistentry id="ecpg">
|
---|
| 358 | <term><command>ecpg</command></term>
|
---|
| 359 | <listitem>
|
---|
| 360 | <para>is the embedded SQL preprocessor.</para>
|
---|
| 361 | <indexterm zone="postgresql ecpg">
|
---|
| 362 | <primary sortas="b-ecpg">ecpg</primary>
|
---|
| 363 | </indexterm>
|
---|
| 364 | </listitem>
|
---|
| 365 | </varlistentry>
|
---|
| 366 |
|
---|
| 367 | <varlistentry id="initdb">
|
---|
| 368 | <term><command>initdb</command></term>
|
---|
| 369 | <listitem>
|
---|
| 370 | <para>creates a new database cluster.</para>
|
---|
| 371 | <indexterm zone="postgresql initdb">
|
---|
| 372 | <primary sortas="b-initdb">initdb</primary>
|
---|
| 373 | </indexterm>
|
---|
| 374 | </listitem>
|
---|
| 375 | </varlistentry>
|
---|
| 376 |
|
---|
[a2957b7] | 377 | <varlistentry id="pg_basebackup">
|
---|
| 378 | <term><command>pg_basebackup</command></term>
|
---|
[4ab91cd] | 379 | <listitem>
|
---|
[a2957b7] | 380 | <para>takes base backups of a running
|
---|
| 381 | <application>PostgreSQL</application> cluster.</para>
|
---|
| 382 | <indexterm zone="postgresql pg_basebackup">
|
---|
| 383 | <primary sortas="b-pg_basebackup">pg_basebackup</primary>
|
---|
[4ab91cd] | 384 | </indexterm>
|
---|
| 385 | </listitem>
|
---|
| 386 | </varlistentry>
|
---|
| 387 |
|
---|
| 388 | <varlistentry id="pg_config">
|
---|
| 389 | <term><command>pg_config</command></term>
|
---|
| 390 | <listitem>
|
---|
| 391 | <para>retrieves <application>PostgreSQL</application> version
|
---|
| 392 | information.</para>
|
---|
| 393 | <indexterm zone="postgresql pg_config">
|
---|
| 394 | <primary sortas="b-pg_config">pg_config</primary>
|
---|
| 395 | </indexterm>
|
---|
| 396 | </listitem>
|
---|
| 397 | </varlistentry>
|
---|
| 398 |
|
---|
| 399 | <varlistentry id="pg_controldata">
|
---|
| 400 | <term><command>pg_controldata</command></term>
|
---|
| 401 | <listitem>
|
---|
| 402 | <para>returns information initialized during
|
---|
| 403 | <command>initdb</command>, such as the catalog version and server
|
---|
| 404 | locale.</para>
|
---|
| 405 | <indexterm zone="postgresql pg_controldata">
|
---|
| 406 | <primary sortas="b-pg_controldata">pg_controldata</primary>
|
---|
| 407 | </indexterm>
|
---|
| 408 | </listitem>
|
---|
| 409 | </varlistentry>
|
---|
| 410 |
|
---|
| 411 | <varlistentry id="pg_ctl">
|
---|
| 412 | <term><command>pg_ctl</command></term>
|
---|
| 413 | <listitem>
|
---|
| 414 | <para>controls stopping and starting the database server.</para>
|
---|
| 415 | <indexterm zone="postgresql pg_ctl">
|
---|
| 416 | <primary sortas="b-pg_ctl">pg_ctl</primary>
|
---|
| 417 | </indexterm>
|
---|
| 418 | </listitem>
|
---|
| 419 | </varlistentry>
|
---|
| 420 |
|
---|
| 421 | <varlistentry id="pg_dump">
|
---|
| 422 | <term><command>pg_dump</command></term>
|
---|
| 423 | <listitem>
|
---|
| 424 | <para>dumps database data and metadata into scripts which are used
|
---|
| 425 | to recreate the database.</para>
|
---|
| 426 | <indexterm zone="postgresql pg_dump">
|
---|
| 427 | <primary sortas="b-pg_dump">pg_dump</primary>
|
---|
| 428 | </indexterm>
|
---|
| 429 | </listitem>
|
---|
| 430 | </varlistentry>
|
---|
| 431 |
|
---|
| 432 | <varlistentry id="pg_dumpall">
|
---|
| 433 | <term><command>pg_dumpall</command></term>
|
---|
| 434 | <listitem>
|
---|
| 435 | <para>recursively calls <command>pg_dump</command> for each
|
---|
| 436 | database in a cluster.</para>
|
---|
| 437 | <indexterm zone="postgresql pg_dumpall">
|
---|
| 438 | <primary sortas="b-pg_dumpall">pg_dumpall</primary>
|
---|
| 439 | </indexterm>
|
---|
| 440 | </listitem>
|
---|
| 441 | </varlistentry>
|
---|
| 442 |
|
---|
| 443 | <varlistentry id="pg_resetxlog">
|
---|
| 444 | <term><command>pg_resetxlog</command></term>
|
---|
| 445 | <listitem>
|
---|
| 446 | <para>clears the write-ahead log and optionally resets some
|
---|
| 447 | fields in the <filename>pg_control</filename> file.</para>
|
---|
| 448 | <indexterm zone="postgresql pg_resetxlog">
|
---|
| 449 | <primary sortas="b-pg_resetxlog">pg_resetxlog</primary>
|
---|
| 450 | </indexterm>
|
---|
| 451 | </listitem>
|
---|
| 452 | </varlistentry>
|
---|
| 453 |
|
---|
| 454 | <varlistentry id="pg_restore">
|
---|
| 455 | <term><command>pg_restore</command></term>
|
---|
| 456 | <listitem>
|
---|
| 457 | <para>creates databases from dump files created by
|
---|
| 458 | <command>pg_dump</command>.</para>
|
---|
| 459 | <indexterm zone="postgresql pg_restore">
|
---|
| 460 | <primary sortas="b-pg_restore">pg_restore</primary>
|
---|
| 461 | </indexterm>
|
---|
| 462 | </listitem>
|
---|
| 463 | </varlistentry>
|
---|
| 464 |
|
---|
| 465 | <varlistentry id="pltcl_delmod">
|
---|
| 466 | <term><command>pltcl_delmod</command></term>
|
---|
| 467 | <listitem>
|
---|
| 468 | <para>is a support script used to delete a module from a
|
---|
| 469 | PL/<application>Tcl</application> table. The command
|
---|
| 470 | requires the <ulink
|
---|
| 471 | url="http://gborg.postgresql.org/project/pgtcl/">Pgtcl</ulink>
|
---|
| 472 | package to be installed also.</para>
|
---|
| 473 | <indexterm zone="postgresql pltcl_delmod">
|
---|
| 474 | <primary sortas="b-pltcl_delmod">pltcl_delmod</primary>
|
---|
| 475 | </indexterm>
|
---|
| 476 | </listitem>
|
---|
| 477 | </varlistentry>
|
---|
| 478 |
|
---|
| 479 | <varlistentry id="pltcl_listmod">
|
---|
| 480 | <term><command>pltcl_listmod</command></term>
|
---|
| 481 | <listitem>
|
---|
| 482 | <para>is a support script used to list the modules in a
|
---|
| 483 | PL/<application>Tcl</application> table. The command
|
---|
| 484 | requires the <ulink
|
---|
| 485 | url="http://gborg.postgresql.org/project/pgtcl/">Pgtcl</ulink>
|
---|
| 486 | package to be installed also.</para>
|
---|
| 487 | <indexterm zone="postgresql pltcl_listmod">
|
---|
| 488 | <primary sortas="b-pltcl_listmod">pltcl_listmod</primary>
|
---|
| 489 | </indexterm>
|
---|
| 490 | </listitem>
|
---|
| 491 | </varlistentry>
|
---|
| 492 |
|
---|
| 493 | <varlistentry id="pltcl_loadmod">
|
---|
| 494 | <term><command>pltcl_loadmod</command></term>
|
---|
| 495 | <listitem>
|
---|
| 496 | <para>is a support script used to load a module into a
|
---|
| 497 | PL/<application>Tcl</application> table. The command
|
---|
| 498 | requires the <ulink
|
---|
| 499 | url="http://gborg.postgresql.org/project/pgtcl/">Pgtcl</ulink>
|
---|
| 500 | package to be installed also.</para>
|
---|
| 501 | <indexterm zone="postgresql pltcl_loadmod">
|
---|
| 502 | <primary sortas="b-pltcl_loadmod">pltcl_loadmod</primary>
|
---|
| 503 | </indexterm>
|
---|
| 504 | </listitem>
|
---|
| 505 | </varlistentry>
|
---|
| 506 |
|
---|
| 507 | <varlistentry id="postgres">
|
---|
| 508 | <term><command>postgres</command></term>
|
---|
| 509 | <listitem>
|
---|
| 510 | <para>is a single user database server, generally used for
|
---|
| 511 | debugging.</para>
|
---|
| 512 | <indexterm zone="postgresql postgres">
|
---|
| 513 | <primary sortas="b-postgres">postgres</primary>
|
---|
| 514 | </indexterm>
|
---|
| 515 | </listitem>
|
---|
| 516 | </varlistentry>
|
---|
| 517 |
|
---|
| 518 | <varlistentry id="postmaster">
|
---|
| 519 | <term><command>postmaster</command></term>
|
---|
| 520 | <listitem>
|
---|
[76acb620] | 521 | <para>(a symlink to <command>postgres</command>) is a multi-user
|
---|
| 522 | database daemon.</para>
|
---|
[4ab91cd] | 523 | <indexterm zone="postgresql postmaster">
|
---|
| 524 | <primary sortas="b-postmaster">postmaster</primary>
|
---|
| 525 | </indexterm>
|
---|
| 526 | </listitem>
|
---|
| 527 | </varlistentry>
|
---|
| 528 |
|
---|
| 529 | <varlistentry id="psql">
|
---|
| 530 | <term><command>psql</command></term>
|
---|
| 531 | <listitem>
|
---|
| 532 | <para>is a console based database shell.</para>
|
---|
| 533 | <indexterm zone="postgresql psql">
|
---|
| 534 | <primary sortas="b-psql">psql</primary>
|
---|
| 535 | </indexterm>
|
---|
| 536 | </listitem>
|
---|
| 537 | </varlistentry>
|
---|
| 538 |
|
---|
[aaeca54] | 539 | <varlistentry id="reindexdb">
|
---|
| 540 | <term><command>reindexdb</command></term>
|
---|
| 541 | <listitem>
|
---|
| 542 | <para>is a utility for rebuilding indexes in a database.</para>
|
---|
[621a551] | 543 | <indexterm zone="postgresql reindexdb">
|
---|
| 544 | <primary sortas="b-reindexdb">reindexdb</primary>
|
---|
[aaeca54] | 545 | </indexterm>
|
---|
| 546 | </listitem>
|
---|
| 547 | </varlistentry>
|
---|
| 548 |
|
---|
[4ab91cd] | 549 | <varlistentry id="vacuumdb">
|
---|
| 550 | <term><command>vacuumdb</command></term>
|
---|
| 551 | <listitem>
|
---|
| 552 | <para>compacts databases and generates statistics for the query
|
---|
| 553 | analyzer.</para>
|
---|
| 554 | <indexterm zone="postgresql vacuumdb">
|
---|
| 555 | <primary sortas="b-vacuumdb">vacuumdb</primary>
|
---|
| 556 | </indexterm>
|
---|
| 557 | </listitem>
|
---|
| 558 | </varlistentry>
|
---|
| 559 |
|
---|
[76acb620] | 560 | <varlistentry id="libecpg">
|
---|
| 561 | <term><filename class='libraryfile'>libecpg.{so,a}</filename></term>
|
---|
| 562 | <listitem>
|
---|
| 563 | <para>contains functions to support embedded SQL in C programs.</para>
|
---|
| 564 | <indexterm zone="postgresql libecpg">
|
---|
| 565 | <primary sortas="c-libecpg">libecpg.{so,a}</primary>
|
---|
| 566 | </indexterm>
|
---|
| 567 | </listitem>
|
---|
| 568 | </varlistentry>
|
---|
| 569 |
|
---|
| 570 | <varlistentry id="libecpg_compat">
|
---|
| 571 | <term><filename class='libraryfile'>libecpg_compat.{so,a}</filename></term>
|
---|
| 572 | <listitem>
|
---|
| 573 | <para>is the ecpg compatability library.</para>
|
---|
| 574 | <indexterm zone="postgresql libecpg_compat">
|
---|
| 575 | <primary sortas="c-libecpg_compat">libecpg_compat.{so,a}</primary>
|
---|
| 576 | </indexterm>
|
---|
| 577 | </listitem>
|
---|
| 578 | </varlistentry>
|
---|
| 579 |
|
---|
| 580 | <varlistentry id="libgport">
|
---|
| 581 | <term><filename class='libraryfile'>libgport.a</filename></term>
|
---|
| 582 | <listitem>
|
---|
| 583 | <para>is the port-specific subsystem of the Postgres backend.</para>
|
---|
| 584 | <indexterm zone="postgresql libgport">
|
---|
| 585 | <primary sortas="c-libgport">libgport.a</primary>
|
---|
| 586 | </indexterm>
|
---|
| 587 | </listitem>
|
---|
| 588 | </varlistentry>
|
---|
| 589 |
|
---|
| 590 | <varlistentry id="libpgtypes">
|
---|
| 591 | <term><filename class='libraryfile'>libpgtypes.{so,a}</filename></term>
|
---|
| 592 | <listitem>
|
---|
| 593 | <para>contains functions for dealing with Postgres data types.</para>
|
---|
| 594 | <indexterm zone="postgresql libpgtypes">
|
---|
| 595 | <primary sortas="c-libpgtypes">libpgtypes.{so,a}</primary>
|
---|
| 596 | </indexterm>
|
---|
| 597 | </listitem>
|
---|
| 598 | </varlistentry>
|
---|
| 599 |
|
---|
| 600 | <varlistentry id="libpq">
|
---|
| 601 | <term><filename class='libraryfile'>libpq.{so,a}</filename></term>
|
---|
| 602 | <listitem>
|
---|
| 603 | <para>is the C programmer's API to Postgres.</para>
|
---|
| 604 | <indexterm zone="postgresql libpq">
|
---|
| 605 | <primary sortas="c-libpq">libpq.{so,a}</primary>
|
---|
| 606 | </indexterm>
|
---|
| 607 | </listitem>
|
---|
| 608 | </varlistentry>
|
---|
| 609 |
|
---|
[4ab91cd] | 610 | </variablelist>
|
---|
| 611 |
|
---|
| 612 | </sect2>
|
---|
[458342f] | 613 |
|
---|
| 614 | </sect1>
|
---|