~ubuntu-branches/ubuntu/hardy/postgresql-common/hardy-backports

« back to all changes in this revision

Viewing changes to architecture.html

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2007-10-21 16:01:08 UTC
  • Revision ID: james.westby@ubuntu.com-20071021160108-6bp6fxhst130l0do
Tags: 80
* pg_upgradecluster: Fix locale error checking.
* pg_upgradecluster: Use cluster_exists() instead of
  cluster_data_directory().
* PgCommon.pm: Fix cluster_data_directory() to consider the data_directory
  setting in postgresql.conf, which should trump the /pgdata symbolic link.
* debian/init.d-functions: Check for 'postgresql.conf' instead of 'pgdata'
  in the test for a valid cluster configuration directory, since 'pgdata' is
  optional now.
* pg_createcluster: Do not create pgdata symlinks to the data directory in
  /etc any more when configuring a >= 8.0 cluster. Use the data_directory
  configuration option instead. (Part of #444689)
* t/020_create_sql_remove.t: Check that clusters still work when replacing
  the data_directory setting with a pgdata symbolic link, and that
  the data_directory setting trumps the symlink.
* pg_upgradecluster: Set correct data_directory config option after copying
  over the old configuration files.
* t/060_obsolete_confparams.t: Restore data_directory setting after
  scribbling over the configuration file with our template.
* PgCommon.pm, cluster_info(): Only return a value for 'logfile' when it is
  not explicitly configured with log_directory and/or log_filename. The
  previous guessing was wrong anyway, since PostgreSQL always appends a
  pretty unpredictable timestamp.
* pg_ctlcluster: Only do log file checks and pass pg_ctl -l option when the
  log file default is used. Otherwise let PostgreSQL do its logfile handling
  and waive log file checks, since we don't know which file is used.
* pg_ctlcluster: Redirect pg_ctl's stdout and stderr to /dev/null, otherwise
  it will hang forever when using a custom log file (and thus not passing
  -l).
* pg_lsclusters: Print "custom" as log file location if a custom one was set
  in postgresql.conf.
* pg_upgradecluster: Enable 'redirect_stderr' in the 7.4 -> 8.x migration of
  'syslog' -> 'log_destination', so that the log output is actually
  complete.
* t/060_obsolete_confparams.t: Enable 'redirect_stderr' in the template
  postgresql.conf's, so that we actually capture log output.
* t/020_create_sql_remove.t: Check proper handling of logs when configuring
  log file in postgresql.conf, using the log symlink, or having neither.
* PgCommon.pm, cluster_info(): Return default log file in 'logfile' if
  neither postgresql.conf nor a 'log' symlink explicitly specify a log file.
* pg_createcluster: Do not create log symlink if using the default log file
  (i. e. when not using -l). (Closes: #444689)
* t/020_create_sql_remove.t: Verify that log symlink is not created by
  default.
* architecture.html: Update to current reality.
* debian/postgresql-common.config: Do not consider versions as obsolete if
  they are newer than the latest officially supported version. This avoids
  confusion when testing new betas in experimental or using backports.
  (Closes: #446635)
* t/TestLib.pm: Make exec_as() work with user name 'root' (not just uid 0).
* Add t/130_nonroot_admin.t: Check that administrative pg_ tools work as
  non-root, too, if the invoker has sufficient permissions on the
  directories (test case for LP #90036).
* pg_{create,drop,upgrade}cluster: Small tweaks to make the scripts work for
  non-root users with sufficient write permissions to
  /etc/postgresql/<version>, /var/lib/postgresql/<version>, and
  /var/log/postgresql. (LP: #90036)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
2
 
3
 
<html>
 
3
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4
4
<head>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  <meta name="author" content="Oliver Elphick, Martin Pitt" />
75
75
 
76
76
<h3>Configuration hierarchy</h3>
77
77
 
78
 
<table cellpadding="6" cellspacing="0" border="0">
 
78
<table cellpadding="6" cellspacing="0" border="1">
79
79
<tr><td><code>/etc/postgresql-common/user_clusters</code></td> <td>maps users
80
80
against clusters and default databases</td></tr>
81
81
 
92
92
 
93
93
<tr>
94
94
  <td><code>/etc/postgresql/<i>version</i>/<i>clustername</i></code></td>
95
 
  <td>Cluster-specific configuration files: <code>postgresql.conf</code>,
96
 
  <code>pg_hba.conf</code>, <code>pg_ident.conf</code>, a symbolic link
97
 
  <code>pgdata</code> which points to the actual data directory, a symbolic
98
 
  link <code>log</code> which points to the postmaster log file, and a symbolic link
99
 
  <code>autovacuum_log</code> which points to the log file of the autovacuum
100
 
  daemon (started if <code>postgresql-contrib-</code><i>version</i> is
101
 
  installed). If this directory contains <code>autovacuum.conf</code>, this is
102
 
  used as the cluster specific autovacuum daemon configuration; if it does not
103
 
  exist, <code>/etc/postgresql-common/autovacuum.conf</code> is used as a
104
 
  fallback. If this directory contains <code>start.conf</code>, that file
105
 
  configures the startup mode of the cluster: <i>auto</i> (start/stop in init
106
 
  script), <i>manual</i> (do not start/stop in init script, but manual control
107
 
  with <code>pg_ctlcluster</code> is possible), <i>disabled</i>
108
 
  (<code>pg_ctlcluster</code> is not allowed).</td>
 
95
  <td>Cluster-specific configuration files: 
 
96
    <ul>
 
97
      <li><code>postgresql.conf</code>, <code>pg_hba.conf</code>, <code>pg_ident.conf</code></li>
 
98
      <li>optionally <code>start.conf</code>: startup mode of the
 
99
        cluster: <code>auto</code> (start/stop in init script),
 
100
        <code>manual</code> (do not start/stop in init script, but manual
 
101
        control with <code>pg_ctlcluster</code> is possible), <i>disabled</i>
 
102
        (<code>pg_ctlcluster</code> is not allowed).</li>
 
103
      <li>optionally a symbolic link <code>log</code> which points to
 
104
      the postmaster log file. Defaults to
 
105
      <code>/var/log/postgresql/postgresql-</code><i>version</i><code>-</code><i>cluster</i><code>.conf</code>.  
 
106
      Explicitly setting <code>log_directory</code> and/or
 
107
      <code>log_filename</code> in <code>postgresql.conf</code>
 
108
      overrides this.</li>
 
109
    </ul>
 
110
 
 
111
    For PostgreSQL versions earlier than 8.1:
 
112
 
 
113
    <ul>
 
114
      <li>a symbolic link <code>autovacuum_log</code> which points to
 
115
      the log file of the autovacuum daemon (started if
 
116
      <code>postgresql-contrib-</code><i>version</i> is installed). If
 
117
      this directory contains <code>autovacuum.conf</code>, this is used
 
118
      as the cluster specific autovacuum daemon configuration; if it
 
119
      does not exist,
 
120
      <code>/etc/postgresql-common/autovacuum.conf</code> is used as a
 
121
      fallback.</li>
 
122
    </ul>
 
123
  </td>
109
124
</tr>
110
125
 
111
126
</table>
112
127
 
113
128
<h3>Per-version files and programs</h3>
114
129
 
115
 
<table cellpadding="6" cellspacing="0" border="0">
116
 
<tr><td><code>/usr/lib/postgresql/<i>version</i></code></td> <td colspan="0" rowspan="3" valign="middle">files for a specific version</td></tr>
 
130
<table cellpadding="6" cellspacing="0" border="1">
 
131
<tr><td><code>/usr/lib/postgresql/<i>version</i></code></td> <td colspan="0" rowspan="3" valign="middle">version specific program and data files</td></tr>
117
132
<tr><td><code>/usr/share/postgresql/<i>version</i></code></td></tr>
118
133
<tr><td><code>/usr/share/doc/postgresql/postgresql-doc-<i>version</i></code></td></tr>
119
134
</table>
120
135
 
121
136
<h3>Common programs</h3>
122
 
<table cellpadding="6" cellspacing="0" border="0">
 
137
<table cellpadding="6" cellspacing="0" border="1">
123
138
<tr><td><code>/usr/share/postgresql-common/pg_wrapper</code></td> <td>environment chooser and program selector</td></tr>
124
139
<tr><td><code>/usr/bin/<i>program</i></code></td>  <td>symbolic links to pg_wrapper, for all client programs</td></tr>
125
140
<tr><td><code>/usr/bin/pg_lsclusters</code></td> <td>list all available clusters with their status and configuration</td></tr>
138
153
<code>user_clusters</code>, the default database will correspond to the user
139
154
name, thus reintroducing the default upstream behaviour.</p>
140
155
 
141
 
<!--
142
 
<h3>pg_wrapper</h3>
143
 
 
144
 
<p>pg_wrapper has been completely rewritten.  When called a pg_default, it 
145
 
allows a user to display his own connection choices, or to change them for
146
 
the current session, or for all sessions (by writing <code>~/.postgresqlrc</code>).
147
 
When called by root, it  allows user_clusters to be changed.
148
 
</p>
149
 
<p>When called as pg_exec, pg_wrapper can execute code from an
150
 
arbitrary version in order to connect to a remote machine.</p>
151
 
 
152
 
<p>When called as a link to any other name, that name is treated as a
153
 
client program and a path to the appropriate version of that program is
154
 
constructed and executed.</p>
155
 
 
156
 
<p>See the man pages for full details of the program's operation.</p>
157
 
-->
158
 
 
159
156
<h3>/etc/init.d/postgresql-<i>version</i></h3>
160
157
 
161
158
<p>This script now handles the postmaster server processes for each
175
172
to the newest available version.</p>
176
173
 
177
174
<p><i><a href="mailto:pkg-postgresql-public@lists.alioth.debian.org">The Debian
178
 
PostgreSQL developers</a> (Oliver Elphick, Martin Pitt)</i></p>
 
175
PostgreSQL developers</a></i></p>
179
176
 
180
177
</body>
181
178
</html>