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