[08254fc] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[08254fc] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[f62b122b] | 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://ftp.fr.postgresql.org/source/v&postgresql-version;/postgresql-&postgresql-version;.tar.bz2">
|
---|
[1d41b80] | 9 | <!ENTITY postgresql-md5sum "bb510edbb533962c0692e211b3bd8cfa">
|
---|
[5aa1d3dd] | 10 | <!ENTITY postgresql-size "11.5 MB">
|
---|
| 11 | <!ENTITY postgresql-buildsize "153 MB (additional 100 MB to run the testsuite)">
|
---|
[1d41b80] | 12 | <!ENTITY postgresql-time "1.7 SBU">
|
---|
[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 |
|
---|
| 36 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 37 | <itemizedlist spacing="compact">
|
---|
| 38 | <listitem>
|
---|
| 39 | <para>Download (HTTP): <ulink url="&postgresql-download-http;"/></para>
|
---|
| 40 | </listitem>
|
---|
| 41 | <listitem>
|
---|
| 42 | <para>Download (FTP): <ulink url="&postgresql-download-ftp;"/></para>
|
---|
| 43 | </listitem>
|
---|
| 44 | <listitem>
|
---|
| 45 | <para>Download MD5 sum: &postgresql-md5sum;</para>
|
---|
| 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
| 48 | <para>Download size: &postgresql-size;</para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>Estimated disk space required: &postgresql-buildsize;</para>
|
---|
| 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>Estimated build time: &postgresql-time;</para>
|
---|
| 55 | </listitem>
|
---|
| 56 | </itemizedlist>
|
---|
| 57 |
|
---|
| 58 | <bridgehead renderas="sect3">PostgreSQL Dependencies</bridgehead>
|
---|
| 59 |
|
---|
| 60 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[a6ac43b] | 61 | <para role="optional"><xref linkend="python"/>,
|
---|
[4ab91cd] | 62 | <xref linkend="tcl"/>,
|
---|
| 63 | <xref linkend="openssl"/>,
|
---|
[6603f8b] | 64 | <xref linkend="linux-pam"/>,
|
---|
[4ab91cd] | 65 | <ulink url="http://www.pdc.kth.se/kth-krb/">krb4</ulink>,
|
---|
| 66 | <xref linkend="mitkrb"/> or <xref linkend="heimdal"/>, and
|
---|
[5aa1d3dd] | 67 | <ulink url="http://developer.apple.com/networking/bonjour/">Bonjour</ulink></para>
|
---|
| 68 |
|
---|
| 69 | <bridgehead renderas="sect4">Optional (To Regenerate Documentation)</bridgehead>
|
---|
| 70 | <para role="optional"><xref linkend="sgml-dtd"/>,
|
---|
| 71 | <xref linkend="docbook-dsssl"/>,
|
---|
| 72 | <xref linkend="openjade"/>, and
|
---|
| 73 | <xref linkend="perl-sgmlspm"/></para>
|
---|
[4ab91cd] | 74 |
|
---|
[3cb0c57] | 75 | <para condition="html" role="usernotes">User Notes:
|
---|
| 76 | <ulink url="&blfs-wiki;/postgresql"/></para>
|
---|
| 77 |
|
---|
[4ab91cd] | 78 | </sect2>
|
---|
| 79 |
|
---|
| 80 | <sect2 role="installation">
|
---|
| 81 | <title>Installation of PostgreSQL</title>
|
---|
| 82 |
|
---|
| 83 | <para>Install <application>PostgreSQL</application> with the
|
---|
| 84 | following commands: </para>
|
---|
[08254fc] | 85 |
|
---|
[5aa1d3dd] | 86 | <screen><userinput>sed -i "s|dsssl-stylesheets|& \\\\\n sgml/docbook/&-&docbook-dsssl-version;|" \
|
---|
[44e4099] | 87 | configure &&
|
---|
[9aeb405d] | 88 | ./configure --prefix=/usr --enable-thread-safety &&
|
---|
[4ab91cd] | 89 | make</userinput></screen>
|
---|
[44e4099] | 90 |
|
---|
[acbce59] | 91 | <para>To test the results, issue: <command>make check</command>.</para>
|
---|
| 92 |
|
---|
[4ab91cd] | 93 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[44e4099] | 94 |
|
---|
[7de21f4] | 95 | <screen role="root"><userinput>make install &&
|
---|
[5aa1d3dd] | 96 | chown -v root:root /usr/share/doc/postgresql/html/* &&
|
---|
| 97 | install -v -m755 -d /usr/share/doc/postgresql/{FAQ/html,TODO.detail} &&
|
---|
| 98 | install -v -m644 doc/TODO /usr/share/doc/postgresql &&
|
---|
| 99 | install -v -m644 doc/FAQ* /usr/share/doc/postgresql/FAQ &&
|
---|
| 100 | install -v -m644 doc/src/FAQ/* /usr/share/doc/postgresql/FAQ/html &&
|
---|
| 101 | install -v -m644 doc/TODO.detail/* \
|
---|
| 102 | /usr/share/doc/postgresql/TODO.detail</userinput></screen>
|
---|
[11404f5] | 103 |
|
---|
[4ab91cd] | 104 | <note>
|
---|
| 105 | <para>If you are upgrading an existing system and are going to install
|
---|
| 106 | the new files over the old ones, then you should back up your data, shut
|
---|
| 107 | down the old server and follow the instructions in <ulink
|
---|
[5aa1d3dd] | 108 | url="http://www.postgresql.org/docs/8.1/static/install-upgrading.html">the
|
---|
[4ab91cd] | 109 | official <application>PostgreSQL</application> documentation</ulink>.</para>
|
---|
| 110 | </note>
|
---|
[08254fc] | 111 |
|
---|
[4ab91cd] | 112 | <para>Initialize a database cluster with the following commands issued by the
|
---|
| 113 | <systemitem class="username">root</systemitem> user:</para>
|
---|
[08254fc] | 114 |
|
---|
[4ab91cd] | 115 | <screen role="root"><userinput>install -v -m755 -d /srv/pgsql/data &&
|
---|
[5aa1d3dd] | 116 | groupadd -g 41 postgres &&
|
---|
| 117 | useradd -c "PostgreSQL Server" -g postgres -d /srv/pgsql/data \
|
---|
[b785ab29] | 118 | -u 41 postgres &&
|
---|
[44e4099] | 119 | chown -v postgres /srv/pgsql/data &&
|
---|
[4ab91cd] | 120 | su - postgres -c '/usr/bin/initdb -D /srv/pgsql/data'</userinput></screen>
|
---|
[08254fc] | 121 |
|
---|
[4ab91cd] | 122 | <para>As the <systemitem class="username">root</systemitem> user, start the
|
---|
| 123 | database server with the following command:</para>
|
---|
[08254fc] | 124 |
|
---|
[4ab91cd] | 125 | <screen role="root"><userinput>su - postgres -c '/usr/bin/postmaster -D /srv/pgsql/data > \
|
---|
| 126 | /srv/pgsql/data/logfile 2>&1 &'</userinput></screen>
|
---|
[08254fc] | 127 |
|
---|
[4ab91cd] | 128 | <para>Still as user <systemitem class="username">root</systemitem>, create
|
---|
| 129 | a database and verify the installation:</para>
|
---|
[08254fc] | 130 |
|
---|
[4ab91cd] | 131 | <screen role="root"><userinput>su - postgres -c '/usr/bin/createdb test' &&
|
---|
[08254fc] | 132 | echo "create table t1 ( name varchar(20), state_province varchar(20) );" \
|
---|
| 133 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
| 134 | echo "insert into t1 values ('Billy', 'NewYork');" \
|
---|
| 135 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
| 136 | echo "insert into t1 values ('Evanidus', 'Quebec');" \
|
---|
| 137 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
| 138 | echo "insert into t1 values ('Jesse', 'Ontario');" \
|
---|
| 139 | | (su - postgres -c '/usr/bin/psql test ') &&
|
---|
[4ab91cd] | 140 | echo "select * from t1;" | (su - postgres -c '/usr/bin/psql test')</userinput></screen>
|
---|
| 141 |
|
---|
| 142 | </sect2>
|
---|
| 143 |
|
---|
| 144 | <sect2 role="commands">
|
---|
| 145 | <title>Command Explanations</title>
|
---|
| 146 |
|
---|
[5aa1d3dd] | 147 | <para><command>sed -i "s|dsssl-stylesheets|..."</command>: This command
|
---|
[4ab91cd] | 148 | puts an extra line in the <command>configure</command> script so that the
|
---|
[5aa1d3dd] | 149 | BLFS installed version of the DSSSL stylesheets are discovered.</para>
|
---|
[08254fc] | 150 |
|
---|
[4ab91cd] | 151 | <para><parameter>--enable-thread-safety</parameter>: This switch makes the
|
---|
| 152 | client libraries thread-safe by allowing concurrent threads in
|
---|
| 153 | <filename class='libraryfile'>libpq</filename> and ECPG programs to safely
|
---|
| 154 | control their private connection handles.</para>
|
---|
| 155 |
|
---|
[5aa1d3dd] | 156 | <para><command>chown -R root:root /usr/share/doc/postgresql/html/*</command>:
|
---|
| 157 | This command corrects the improper ownership of documentation files.</para>
|
---|
[4ab91cd] | 158 |
|
---|
[5aa1d3dd] | 159 | <para><command>groupadd ...</command>; <command>useradd ...</command>:
|
---|
| 160 | These commands add an unprivileged user and group to run the database
|
---|
| 161 | server.</para>
|
---|
[4ab91cd] | 162 |
|
---|
| 163 | <para><command>createdb test; create table t1; insert into t1 values...;
|
---|
| 164 | select * from t1</command>: Create a database, add a table to it, insert
|
---|
| 165 | some rows into the table and select them to verify that the installation
|
---|
| 166 | is working properly.</para>
|
---|
| 167 |
|
---|
| 168 | </sect2>
|
---|
| 169 |
|
---|
| 170 | <sect2 role="configuration">
|
---|
| 171 | <title>Configuring PostgreSQL</title>
|
---|
| 172 |
|
---|
| 173 | <sect3 id="postgresql-config">
|
---|
| 174 | <title>Config Files</title>
|
---|
| 175 |
|
---|
| 176 | <para><filename>$PGDATA/pg_ident.con</filename>,
|
---|
| 177 | <filename>$PGDATA/pg_hba.conf</filename> and
|
---|
| 178 | <filename>$PGDATA/postgresql.conf</filename></para>
|
---|
| 179 |
|
---|
| 180 | <indexterm zone="postgresql postgresql-config">
|
---|
| 181 | <primary sortas="e-A.PGDATA-pg_ident.con">$PGDATA/pg_indent.con</primary>
|
---|
| 182 | </indexterm>
|
---|
| 183 |
|
---|
| 184 | <indexterm zone="postgresql postgresql-config">
|
---|
| 185 | <primary sortas="e-A.PGDATA-pg_hba.conf">$PGDATA/pg_hba_conf</primary>
|
---|
| 186 | </indexterm>
|
---|
| 187 |
|
---|
| 188 | <indexterm zone="postgresql postgresql-config">
|
---|
| 189 | <primary sortas="e-A.PGDATA-postgresql.conf">$PGDATA/postgresql.conf</primary>
|
---|
| 190 | </indexterm>
|
---|
| 191 |
|
---|
| 192 | <para>The <envar>PGDATA</envar> environment variable is used to
|
---|
| 193 | distinguish database clusters from one another by setting it to
|
---|
| 194 | the value of the directory which contains the cluster desired.
|
---|
| 195 | The three configuration files exist in every <filename
|
---|
| 196 | class="directory">PGDATA/</filename> directory. Details on the
|
---|
| 197 | format of the files and the options that can be set in each can
|
---|
| 198 | be found in <ulink
|
---|
| 199 | url="file:///usr/share/doc/postgresql/html/index.html"/>.</para>
|
---|
| 200 |
|
---|
| 201 | </sect3>
|
---|
| 202 |
|
---|
| 203 | <sect3 id="postgresql-init">
|
---|
| 204 | <title>Boot Script</title>
|
---|
| 205 |
|
---|
| 206 | <para>Install the <filename>/etc/rc.d/init.d/postgresql</filename>
|
---|
| 207 | init script included in the
|
---|
[5254d12] | 208 | <xref linkend="bootscripts"/> package.</para>
|
---|
[4ab91cd] | 209 |
|
---|
| 210 | <indexterm zone="postgresql postgresql-init">
|
---|
| 211 | <primary sortas="f-postgresql">postgresql</primary>
|
---|
| 212 | </indexterm>
|
---|
| 213 |
|
---|
| 214 | <screen role="root"><userinput>make install-postgresql</userinput></screen>
|
---|
| 215 |
|
---|
| 216 | </sect3>
|
---|
| 217 |
|
---|
| 218 | </sect2>
|
---|
| 219 |
|
---|
| 220 | <sect2 role="content">
|
---|
| 221 | <title>Contents</title>
|
---|
| 222 |
|
---|
| 223 | <segmentedlist>
|
---|
| 224 | <segtitle>Installed Programs</segtitle>
|
---|
| 225 | <segtitle>Installed Libraries</segtitle>
|
---|
| 226 | <segtitle>Installed Directories</segtitle>
|
---|
| 227 |
|
---|
| 228 | <seglistitem>
|
---|
| 229 | <seg>clusterdb, createdb, createlang, createuser, dropdb, droplang,
|
---|
| 230 | dropuser, ecpg, initdb, ipcclean, pg_config, pg_controldata, pg_ctl,
|
---|
| 231 | pg_dump, pg_dumpall, pg_resetxlog, pg_restore, pltcl_delmod,
|
---|
| 232 | pltcl_listmod, pltcl_loadmod, postgres, postmaster, psql, and
|
---|
| 233 | vacuumdb</seg>
|
---|
[3cb0c57] | 234 | <seg>libecpg.{so,a}, libecpg_compat.{so,a}, libpgport.a, libpgtypes.{so,a},
|
---|
| 235 | libpq.{so,a}, and various charset modules.</seg>
|
---|
[4ab91cd] | 236 | <seg>/srv/pgsql, /usr/include/libpq, /usr/include/postgresql,
|
---|
| 237 | /usr/lib/postgresql, /usr/share/doc/postgresql, and
|
---|
| 238 | /usr/share/postgresql</seg>
|
---|
| 239 | </seglistitem>
|
---|
| 240 | </segmentedlist>
|
---|
| 241 |
|
---|
| 242 | <variablelist>
|
---|
| 243 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 244 | <?dbfo list-presentation="list"?>
|
---|
| 245 | <?dbhtml list-presentation="table"?>
|
---|
| 246 |
|
---|
| 247 | <varlistentry id="clusterdb">
|
---|
| 248 | <term><command>clusterdb</command></term>
|
---|
| 249 | <listitem>
|
---|
| 250 | <para>is a utility for reclustering tables in a
|
---|
| 251 | <application>PostgreSQL</application> database.</para>
|
---|
| 252 | <indexterm zone="postgresql clusterdb">
|
---|
| 253 | <primary sortas="b-clusterdb">clusterdb</primary>
|
---|
| 254 | </indexterm>
|
---|
| 255 | </listitem>
|
---|
| 256 | </varlistentry>
|
---|
| 257 |
|
---|
| 258 | <varlistentry id="createdb">
|
---|
| 259 | <term><command>createdb</command></term>
|
---|
| 260 | <listitem>
|
---|
| 261 | <para> creates a new <application>PostgreSQL</application>
|
---|
| 262 | database.</para>
|
---|
| 263 | <indexterm zone="postgresql createdb">
|
---|
| 264 | <primary sortas="b-createdb">createdb</primary>
|
---|
| 265 | </indexterm>
|
---|
| 266 | </listitem>
|
---|
| 267 | </varlistentry>
|
---|
| 268 |
|
---|
| 269 | <varlistentry id="createlang">
|
---|
| 270 | <term><command>createlang</command></term>
|
---|
| 271 | <listitem>
|
---|
| 272 | <para>defines a new <application>PostgreSQL</application> procedural
|
---|
| 273 | language.</para>
|
---|
| 274 | <indexterm zone="postgresql createlang">
|
---|
| 275 | <primary sortas="b-createlang">createlang</primary>
|
---|
| 276 | </indexterm>
|
---|
| 277 | </listitem>
|
---|
| 278 | </varlistentry>
|
---|
| 279 |
|
---|
| 280 | <varlistentry id="createuser">
|
---|
| 281 | <term><command>createuser</command></term>
|
---|
| 282 | <listitem>
|
---|
| 283 | <para>defines a new <application>PostgreSQL</application>
|
---|
| 284 | user account.</para>
|
---|
| 285 | <indexterm zone="postgresql createuser">
|
---|
| 286 | <primary sortas="b-createuser">createuser</primary>
|
---|
| 287 | </indexterm>
|
---|
| 288 | </listitem>
|
---|
| 289 | </varlistentry>
|
---|
| 290 |
|
---|
| 291 | <varlistentry id="dropdb">
|
---|
| 292 | <term><command>dropdb</command></term>
|
---|
| 293 | <listitem>
|
---|
| 294 | <para>removes a <application>PostgreSQL</application> database.</para>
|
---|
| 295 | <indexterm zone="postgresql dropdb">
|
---|
| 296 | <primary sortas="b-dropdb">dropdb</primary>
|
---|
| 297 | </indexterm>
|
---|
| 298 | </listitem>
|
---|
| 299 | </varlistentry>
|
---|
| 300 |
|
---|
| 301 | <varlistentry id="droplang">
|
---|
| 302 | <term><command>droplang</command></term>
|
---|
| 303 | <listitem>
|
---|
| 304 | <para>removes a <application>PostgreSQL</application> procedural
|
---|
| 305 | language.</para>
|
---|
| 306 | <indexterm zone="postgresql droplang">
|
---|
| 307 | <primary sortas="b-droplang">droplang</primary>
|
---|
| 308 | </indexterm>
|
---|
| 309 | </listitem>
|
---|
| 310 | </varlistentry>
|
---|
| 311 |
|
---|
| 312 | <varlistentry id="dropuser">
|
---|
| 313 | <term><command>dropuser</command></term>
|
---|
| 314 | <listitem>
|
---|
| 315 | <para>removes a <application>PostgreSQL</application>
|
---|
| 316 | user account.</para>
|
---|
| 317 | <indexterm zone="postgresql dropuser">
|
---|
| 318 | <primary sortas="b-dropuser">dropuser</primary>
|
---|
| 319 | </indexterm>
|
---|
| 320 | </listitem>
|
---|
| 321 | </varlistentry>
|
---|
| 322 |
|
---|
| 323 | <varlistentry id="ecpg">
|
---|
| 324 | <term><command>ecpg</command></term>
|
---|
| 325 | <listitem>
|
---|
| 326 | <para>is the embedded SQL preprocessor.</para>
|
---|
| 327 | <indexterm zone="postgresql ecpg">
|
---|
| 328 | <primary sortas="b-ecpg">ecpg</primary>
|
---|
| 329 | </indexterm>
|
---|
| 330 | </listitem>
|
---|
| 331 | </varlistentry>
|
---|
| 332 |
|
---|
| 333 | <varlistentry id="initdb">
|
---|
| 334 | <term><command>initdb</command></term>
|
---|
| 335 | <listitem>
|
---|
| 336 | <para>creates a new database cluster.</para>
|
---|
| 337 | <indexterm zone="postgresql initdb">
|
---|
| 338 | <primary sortas="b-initdb">initdb</primary>
|
---|
| 339 | </indexterm>
|
---|
| 340 | </listitem>
|
---|
| 341 | </varlistentry>
|
---|
| 342 |
|
---|
| 343 | <varlistentry id="ipcclean">
|
---|
| 344 | <term><command>ipcclean</command></term>
|
---|
| 345 | <listitem>
|
---|
| 346 | <para>removes shared memory and semaphores left over by an aborted
|
---|
| 347 | database server.</para>
|
---|
| 348 | <indexterm zone="postgresql ipcclean">
|
---|
| 349 | <primary sortas="b-ipcclean">ipcclean</primary>
|
---|
| 350 | </indexterm>
|
---|
| 351 | </listitem>
|
---|
| 352 | </varlistentry>
|
---|
| 353 |
|
---|
| 354 | <varlistentry id="pg_config">
|
---|
| 355 | <term><command>pg_config</command></term>
|
---|
| 356 | <listitem>
|
---|
| 357 | <para>retrieves <application>PostgreSQL</application> version
|
---|
| 358 | information.</para>
|
---|
| 359 | <indexterm zone="postgresql pg_config">
|
---|
| 360 | <primary sortas="b-pg_config">pg_config</primary>
|
---|
| 361 | </indexterm>
|
---|
| 362 | </listitem>
|
---|
| 363 | </varlistentry>
|
---|
| 364 |
|
---|
| 365 | <varlistentry id="pg_controldata">
|
---|
| 366 | <term><command>pg_controldata</command></term>
|
---|
| 367 | <listitem>
|
---|
| 368 | <para>returns information initialized during
|
---|
| 369 | <command>initdb</command>, such as the catalog version and server
|
---|
| 370 | locale.</para>
|
---|
| 371 | <indexterm zone="postgresql pg_controldata">
|
---|
| 372 | <primary sortas="b-pg_controldata">pg_controldata</primary>
|
---|
| 373 | </indexterm>
|
---|
| 374 | </listitem>
|
---|
| 375 | </varlistentry>
|
---|
| 376 |
|
---|
| 377 | <varlistentry id="pg_ctl">
|
---|
| 378 | <term><command>pg_ctl</command></term>
|
---|
| 379 | <listitem>
|
---|
| 380 | <para>controls stopping and starting the database server.</para>
|
---|
| 381 | <indexterm zone="postgresql pg_ctl">
|
---|
| 382 | <primary sortas="b-pg_ctl">pg_ctl</primary>
|
---|
| 383 | </indexterm>
|
---|
| 384 | </listitem>
|
---|
| 385 | </varlistentry>
|
---|
| 386 |
|
---|
| 387 | <varlistentry id="pg_dump">
|
---|
| 388 | <term><command>pg_dump</command></term>
|
---|
| 389 | <listitem>
|
---|
| 390 | <para>dumps database data and metadata into scripts which are used
|
---|
| 391 | to recreate the database.</para>
|
---|
| 392 | <indexterm zone="postgresql pg_dump">
|
---|
| 393 | <primary sortas="b-pg_dump">pg_dump</primary>
|
---|
| 394 | </indexterm>
|
---|
| 395 | </listitem>
|
---|
| 396 | </varlistentry>
|
---|
| 397 |
|
---|
| 398 | <varlistentry id="pg_dumpall">
|
---|
| 399 | <term><command>pg_dumpall</command></term>
|
---|
| 400 | <listitem>
|
---|
| 401 | <para>recursively calls <command>pg_dump</command> for each
|
---|
| 402 | database in a cluster.</para>
|
---|
| 403 | <indexterm zone="postgresql pg_dumpall">
|
---|
| 404 | <primary sortas="b-pg_dumpall">pg_dumpall</primary>
|
---|
| 405 | </indexterm>
|
---|
| 406 | </listitem>
|
---|
| 407 | </varlistentry>
|
---|
| 408 |
|
---|
| 409 | <varlistentry id="pg_resetxlog">
|
---|
| 410 | <term><command>pg_resetxlog</command></term>
|
---|
| 411 | <listitem>
|
---|
| 412 | <para>clears the write-ahead log and optionally resets some
|
---|
| 413 | fields in the <filename>pg_control</filename> file.</para>
|
---|
| 414 | <indexterm zone="postgresql pg_resetxlog">
|
---|
| 415 | <primary sortas="b-pg_resetxlog">pg_resetxlog</primary>
|
---|
| 416 | </indexterm>
|
---|
| 417 | </listitem>
|
---|
| 418 | </varlistentry>
|
---|
| 419 |
|
---|
| 420 | <varlistentry id="pg_restore">
|
---|
| 421 | <term><command>pg_restore</command></term>
|
---|
| 422 | <listitem>
|
---|
| 423 | <para>creates databases from dump files created by
|
---|
| 424 | <command>pg_dump</command>.</para>
|
---|
| 425 | <indexterm zone="postgresql pg_restore">
|
---|
| 426 | <primary sortas="b-pg_restore">pg_restore</primary>
|
---|
| 427 | </indexterm>
|
---|
| 428 | </listitem>
|
---|
| 429 | </varlistentry>
|
---|
| 430 |
|
---|
| 431 | <varlistentry id="pltcl_delmod">
|
---|
| 432 | <term><command>pltcl_delmod</command></term>
|
---|
| 433 | <listitem>
|
---|
| 434 | <para>is a support script used to delete a module from a
|
---|
| 435 | PL/<application>Tcl</application> table. The command
|
---|
| 436 | requires the <ulink
|
---|
| 437 | url="http://gborg.postgresql.org/project/pgtcl/">Pgtcl</ulink>
|
---|
| 438 | package to be installed also.</para>
|
---|
| 439 | <indexterm zone="postgresql pltcl_delmod">
|
---|
| 440 | <primary sortas="b-pltcl_delmod">pltcl_delmod</primary>
|
---|
| 441 | </indexterm>
|
---|
| 442 | </listitem>
|
---|
| 443 | </varlistentry>
|
---|
| 444 |
|
---|
| 445 | <varlistentry id="pltcl_listmod">
|
---|
| 446 | <term><command>pltcl_listmod</command></term>
|
---|
| 447 | <listitem>
|
---|
| 448 | <para>is a support script used to list the modules in a
|
---|
| 449 | PL/<application>Tcl</application> table. The command
|
---|
| 450 | requires the <ulink
|
---|
| 451 | url="http://gborg.postgresql.org/project/pgtcl/">Pgtcl</ulink>
|
---|
| 452 | package to be installed also.</para>
|
---|
| 453 | <indexterm zone="postgresql pltcl_listmod">
|
---|
| 454 | <primary sortas="b-pltcl_listmod">pltcl_listmod</primary>
|
---|
| 455 | </indexterm>
|
---|
| 456 | </listitem>
|
---|
| 457 | </varlistentry>
|
---|
| 458 |
|
---|
| 459 | <varlistentry id="pltcl_loadmod">
|
---|
| 460 | <term><command>pltcl_loadmod</command></term>
|
---|
| 461 | <listitem>
|
---|
| 462 | <para>is a support script used to load a module into a
|
---|
| 463 | PL/<application>Tcl</application> table. The command
|
---|
| 464 | requires the <ulink
|
---|
| 465 | url="http://gborg.postgresql.org/project/pgtcl/">Pgtcl</ulink>
|
---|
| 466 | package to be installed also.</para>
|
---|
| 467 | <indexterm zone="postgresql pltcl_loadmod">
|
---|
| 468 | <primary sortas="b-pltcl_loadmod">pltcl_loadmod</primary>
|
---|
| 469 | </indexterm>
|
---|
| 470 | </listitem>
|
---|
| 471 | </varlistentry>
|
---|
| 472 |
|
---|
| 473 | <varlistentry id="postgres">
|
---|
| 474 | <term><command>postgres</command></term>
|
---|
| 475 | <listitem>
|
---|
| 476 | <para>is a single user database server, generally used for
|
---|
| 477 | debugging.</para>
|
---|
| 478 | <indexterm zone="postgresql postgres">
|
---|
| 479 | <primary sortas="b-postgres">postgres</primary>
|
---|
| 480 | </indexterm>
|
---|
| 481 | </listitem>
|
---|
| 482 | </varlistentry>
|
---|
| 483 |
|
---|
| 484 | <varlistentry id="postmaster">
|
---|
| 485 | <term><command>postmaster</command></term>
|
---|
| 486 | <listitem>
|
---|
| 487 | <para>is a multi-user database daemon.</para>
|
---|
| 488 | <indexterm zone="postgresql postmaster">
|
---|
| 489 | <primary sortas="b-postmaster">postmaster</primary>
|
---|
| 490 | </indexterm>
|
---|
| 491 | </listitem>
|
---|
| 492 | </varlistentry>
|
---|
| 493 |
|
---|
| 494 | <varlistentry id="psql">
|
---|
| 495 | <term><command>psql</command></term>
|
---|
| 496 | <listitem>
|
---|
| 497 | <para>is a console based database shell.</para>
|
---|
| 498 | <indexterm zone="postgresql psql">
|
---|
| 499 | <primary sortas="b-psql">psql</primary>
|
---|
| 500 | </indexterm>
|
---|
| 501 | </listitem>
|
---|
| 502 | </varlistentry>
|
---|
| 503 |
|
---|
| 504 | <varlistentry id="vacuumdb">
|
---|
| 505 | <term><command>vacuumdb</command></term>
|
---|
| 506 | <listitem>
|
---|
| 507 | <para>compacts databases and generates statistics for the query
|
---|
| 508 | analyzer.</para>
|
---|
| 509 | <indexterm zone="postgresql vacuumdb">
|
---|
| 510 | <primary sortas="b-vacuumdb">vacuumdb</primary>
|
---|
| 511 | </indexterm>
|
---|
| 512 | </listitem>
|
---|
| 513 | </varlistentry>
|
---|
| 514 |
|
---|
| 515 | </variablelist>
|
---|
| 516 |
|
---|
| 517 | </sect2>
|
---|
[458342f] | 518 |
|
---|
| 519 | </sect1>
|
---|