Improvements to Maintenance and External Projects documentation.
Joshua D. Drake Robert Treat
This commit is contained in:
parent
ffb62be07a
commit
8d5f3c8d89
@ -1,29 +1,34 @@
|
|||||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/external-projects.sgml,v 1.10 2006/03/10 19:10:47 momjian Exp $ -->
|
<!-- $PostgreSQL: pgsql/doc/src/sgml/external-projects.sgml,v 1.11 2006/08/01 00:09:06 momjian Exp $ -->
|
||||||
|
|
||||||
<appendix id="external-projects">
|
<appendix id="external-projects">
|
||||||
<title>External Projects</title>
|
<title>PgFoundry and External Projects</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<productname>PostgreSQL</productname> is a complex software project,
|
<productname>PostgreSQL</productname> is a complex software project,
|
||||||
and managing it is difficult. We have found that many
|
and managing the project is difficult. We have found that many
|
||||||
enhancements to <productname>PostgreSQL</productname> can be more
|
enhancements to <productname>PostgreSQL</productname> can be more
|
||||||
efficiently developed separately from the core project. Separate
|
efficiently developed separately from the core project.
|
||||||
projects can
|
|
||||||
have their own developer teams, email lists, bug tracking,
|
|
||||||
and release schedules. While their independence makes
|
|
||||||
development easier, it makes users' jobs harder. They have to hunt
|
|
||||||
around looking for database enhancements to meet their needs.
|
|
||||||
This section describes some of the more popular externally
|
|
||||||
developed enhancements and guides you on how to find them.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Many <productname>PostgreSQL</productname>-related projects are
|
To help our community with the development of their external projects,
|
||||||
hosted at either
|
we have created the <ulink url="http://www.pgfoundry.org/">PgFoundry</ulink>.
|
||||||
<ulink url="http://gborg.postgresql.org"><productname>GBorg</></ulink>
|
<ulink url="http://www.pgfoundry.org/">PgFoundry</ulink> is built using the
|
||||||
or <ulink url="http://pgfoundry.org"><productname>pgFoundry</></ulink>.
|
GForge software project and is similar to SourceForge in its feature set. If
|
||||||
There are other <productname>PostgreSQL</productname>-related projects that are hosted
|
you have a PostgreSQL related Open Source project that you would like to
|
||||||
elsewhere, but you will have to do an Internet search to find them.
|
develop and need project management resources such as mailing lists, forums,
|
||||||
|
bug tracking, and CVS, please feel free to create a new project.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Secondly, many <productname>PostgreSQL</productname>-related projects are
|
||||||
|
still hosted at <ulink url="http://gborg.postgresql.org"><productname>GBorg</></ulink>.
|
||||||
|
GBorg is the original external community developer site, and while it is
|
||||||
|
currently closed to new projects in favor of PgFoundry, it still contains
|
||||||
|
many active and relevant projects. There are other popular <productname>PostgreSQL</productname>
|
||||||
|
related projects that are hosted independently as well at other community
|
||||||
|
sites such as <ulink url="http://www.sf.net">SourceForge</ulink>. You should
|
||||||
|
google if you don't find the project you are looking for.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<sect1 id="external-interfaces">
|
<sect1 id="external-interfaces">
|
||||||
@ -36,11 +41,10 @@
|
|||||||
<para>
|
<para>
|
||||||
<productname>PostgreSQL</productname> includes very few interfaces
|
<productname>PostgreSQL</productname> includes very few interfaces
|
||||||
with the base distribution. <application>libpq</> is packaged because
|
with the base distribution. <application>libpq</> is packaged because
|
||||||
it is the primary <application>C</> interface and many other
|
it is the primary dependecy of most interfaces available to PostgreSQL.
|
||||||
interfaces are built on top of it. <application>ecpg</> is packaged
|
We also package <application>ecpg</> because it is tied to the
|
||||||
because it is tied to the server-side grammar so is very dependent
|
server-side grammar. All other interfaces, such as PHP, Perl, Python,
|
||||||
on the database version. All the other interfaces are independent
|
and Ruby, are external projects.
|
||||||
projects and must be installed separately.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -52,7 +56,17 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
This is the most common interface for <application>Windows</>
|
This is the most common interface for <application>Windows</>
|
||||||
applications.
|
applications. <ulink url="http://odbc.postgresql.org/">Website.</ulink>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>ODBCng</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Another ODBC driver for PostgreSQL.
|
||||||
|
<ulink url="http://projects.commandprompt.com/public/odbcng/">Website.</ulink>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -62,6 +76,7 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
A <application>JDBC</> interface.
|
A <application>JDBC</> interface.
|
||||||
|
<ulink url="http://jdbc.postgresql.org/">Website.</ulink>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -70,8 +85,8 @@
|
|||||||
<term>Npgsql</term>
|
<term>Npgsql</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<application>.Net</> interface for more recent
|
<application>.Net</> interface for more recent <application>mono/C#</> applications.
|
||||||
<application>Windows</> applications.
|
<ulink url="http://pgfoundry.org/projects/npgsql/">Website.</ulink>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -81,35 +96,17 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
A newer <application>C++</> interface.
|
A newer <application>C++</> interface.
|
||||||
|
<ulink url="http://thaiopensource.org/development/libpqxx/">Website.</ulink>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>libpq++</term>
|
<term>DBD::Pg</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
An older <application>C++</> interface.
|
A <application>Perl</> DBI driver for PostgreSQL.
|
||||||
</para>
|
<ulink url="http://search.cpan.org/dist/DBD-Pg/">Website.</ulink>
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>pgperl</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
A <application>Perl</> interface with an <acronym>API</> similar
|
|
||||||
to <application>libpq</>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>DBD-Pg</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
A <application>Perl</> interface that uses the
|
|
||||||
<acronym>DBD</>-standard <application>API</>.
|
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -119,33 +116,21 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
A newer version of the <application>Tcl</> interface.
|
A newer version of the <application>Tcl</> interface.
|
||||||
|
<ulink url="http://gborg.postgresql.org/project/pgtclng/projdisplay.php">Website.</ulink>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>pgtcl</term>
|
<term>Pyscopg</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The original version of the <application>Tcl</> interface.
|
A <application>Python</> interface library that is DB API 2.0 compliant.
|
||||||
|
<ulink url="http://www.initd.org/">Website.</ulink>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>PyGreSQL</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
A <application>Python</> interface library.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
All of these can be found at
|
|
||||||
<ulink url="http://gborg.postgresql.org"><productname>GBorg</></ulink>
|
|
||||||
or <ulink url="http://pgfoundry.org"><productname>pgFoundry</></ulink>.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
@ -175,8 +160,8 @@
|
|||||||
<para>
|
<para>
|
||||||
There are several administration tools available for
|
There are several administration tools available for
|
||||||
<productname>PostgreSQL</>. The most popular is
|
<productname>PostgreSQL</>. The most popular is
|
||||||
<application>pgAdmin</>, and there are several commercially
|
<application><ulink url="http://www.pgadmin.org/">pgAdmin III</ulink></>,
|
||||||
available ones.
|
and there are several commercially available ones as well.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.56 2006/06/18 15:38:35 petere Exp $ -->
|
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.57 2006/08/01 00:09:06 momjian Exp $ -->
|
||||||
|
|
||||||
<chapter id="maintenance">
|
<chapter id="maintenance">
|
||||||
<title>Routine Database Maintenance Tasks</title>
|
<title>Routine Database Maintenance Tasks</title>
|
||||||
@ -7,43 +7,41 @@
|
|||||||
<primary>maintenance</primary>
|
<primary>maintenance</primary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
|
|
||||||
<para>
|
<indexterm zone="maintenance">
|
||||||
There are a few routine maintenance chores that must be performed on
|
<primary>Routine maintenance</primary>
|
||||||
a regular basis to keep a <productname>PostgreSQL</productname>
|
</indexterm>
|
||||||
server running smoothly. The tasks discussed here are repetitive
|
|
||||||
in nature and can easily be automated using standard Unix tools such
|
|
||||||
as <application>cron</application> scripts. But it is the database
|
|
||||||
administrator's responsibility to set up appropriate scripts, and to
|
|
||||||
check that they execute successfully.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
One obvious maintenance task is creation of backup copies of the data on a
|
PostgreSQL, like any database software, requires that certain tasks
|
||||||
regular schedule. Without a recent backup, you have no chance of recovery
|
be performed regularly to achieve optimum performance. The tasks
|
||||||
after a catastrophe (disk failure, fire, mistakenly dropping a critical
|
discussed here are <emphasis>required</emphasis>, but they
|
||||||
table, etc.). The backup and recovery mechanisms available in
|
are repetitive in nature and can easily be automated using standard
|
||||||
<productname>PostgreSQL</productname> are discussed at length in
|
Unix tools such as <application>cron</application> scripts.
|
||||||
<xref linkend="backup">.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The other main category of maintenance task is periodic <quote>vacuuming</>
|
|
||||||
of the database. This activity is discussed in
|
|
||||||
<xref linkend="routine-vacuuming">.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Something else that might need periodic attention is log file management.
|
|
||||||
This is discussed in <xref linkend="logfile-maintenance">.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<productname>PostgreSQL</productname> is low-maintenance compared
|
<productname>PostgreSQL</productname> is low-maintenance compared
|
||||||
to some other database management systems. Nonetheless,
|
to other database management systems. It is also fairly easy, provided
|
||||||
appropriate attention to these tasks will go far towards ensuring a
|
you read the documentation.
|
||||||
pleasant and productive experience with the system.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
There are three tasks that <emphasis>must</emphasis> be performed on
|
||||||
|
a periodic basis. The first is backups. If you do not have a current backup
|
||||||
|
and your system experiences a catastrophic failure, you will lose your data.
|
||||||
|
You can read further about backups procedures in <xref linkend="backup">.
|
||||||
|
The second is vacuum which is discussed in <xref linkend="routine-vacuuming">.
|
||||||
|
The third is to update the planner statistics using the analyze command as
|
||||||
|
discussed in <xref linkend="vacuum-for-statistics">.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Another task that may need periodic attention is log file management.
|
||||||
|
This is discussed in <xref linkend="logfile-maintenance">.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<sect1 id="routine-vacuuming">
|
<sect1 id="routine-vacuuming">
|
||||||
<title>Routine Vacuuming</title>
|
<title>Routine Vacuuming</title>
|
||||||
|
|
||||||
@ -53,11 +51,11 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
<productname>PostgreSQL</productname>'s <command>VACUUM</> command
|
<productname>PostgreSQL</productname>'s <command>VACUUM</> command
|
||||||
must be run on a regular basis for several reasons:
|
<emphasis>must</emphasis> be run on a regular basis for several reasons:
|
||||||
|
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<simpara>To recover disk space occupied by updated or deleted
|
<simpara>To recover or reuse disk space occupied by updated or deleted
|
||||||
rows.</simpara>
|
rows.</simpara>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
@ -82,11 +80,12 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The standard form of <command>VACUUM</> can run in parallel with
|
The standard form of <command>VACUUM</> does not intefere with production
|
||||||
normal database operations (SELECTs, INSERTs, UPDATEs, DELETEs, but not
|
database operations. Items such as SELECTS, INSERTS, UPDATES and DELETES
|
||||||
changes to table definitions).
|
will continue to function as normal, though you will not be able to modify the
|
||||||
Beginning in <productname>PostgreSQL</productname> 8.0, there are
|
definition (Such as ALTER TABLE ADD COLUMN) of a table while it is being vacuumed.
|
||||||
configuration parameters that can be adjusted to further reduce the
|
The release of <productname>PostgreSQL</productname> 8.0, introduced new
|
||||||
|
configuration parameters to further reduce the potentially negative
|
||||||
performance impact of background vacuuming. See
|
performance impact of background vacuuming. See
|
||||||
<xref linkend="runtime-config-resource-vacuum-cost">.
|
<xref linkend="runtime-config-resource-vacuum-cost">.
|
||||||
</para>
|
</para>
|
||||||
@ -187,9 +186,9 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you have a table whose contents are deleted on a periodic
|
If you have a table whose entire contents are deleted on a periodic
|
||||||
basis, consider doing it with <command>TRUNCATE</command> rather
|
basis, consider doing it with the <command>TRUNCATE</command> rather
|
||||||
than using <command>DELETE</command> followed by
|
than using the <command>DELETE</command> followed by
|
||||||
<command>VACUUM</command>. <command>TRUNCATE</command> removes the
|
<command>VACUUM</command>. <command>TRUNCATE</command> removes the
|
||||||
entire content of the table immediately, without requiring a
|
entire content of the table immediately, without requiring a
|
||||||
subsequent <command>VACUUM</command> or <command>VACUUM
|
subsequent <command>VACUUM</command> or <command>VACUUM
|
||||||
|
Loading…
x
Reference in New Issue
Block a user