1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>19.4.Database Configuration</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css">
<link rev="made" href="pgsql-docs@postgresql.org">
<meta name="generator" content="DocBook XSL Stylesheets V1.70.0">
<link rel="start" href="index.html" title="PostgreSQL 8.1.4 Documentation">
<link rel="up" href="managing-databases.html" title="Chapter19.Managing Databases">
<link rel="prev" href="manage-ag-templatedbs.html" title="19.3.Template Databases">
<link rel="next" href="manage-ag-dropdb.html" title="19.5.Destroying a Database">
<link rel="copyright" href="ln-legalnotice.html" title="Legal Notice">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="manage-ag-config"></a>19.4.Database Configuration</h2></div></div></div>
<p> Recall from <a href="runtime-config.html" title="Chapter17.Server Configuration">Chapter17, <i>Server Configuration</i></a> that the
<span class="productname">PostgreSQL</span> server provides a large number of
run-time configuration variables. You can set database-specific
default values for many of these settings.
</p>
<p> For example, if for some reason you want to disable the
<acronym class="acronym">GEQO</acronym> optimizer for a given database, you'd
ordinarily have to either disable it for all databases or make sure
that every connecting client is careful to issue <code class="literal">SET geqo
TO off;</code>. To make this setting the default within a particular
database, you can execute the command
</p>
<pre class="programlisting">ALTER DATABASE mydb SET geqo TO off;</pre>
<p>
This will save the setting (but not set it immediately). In
subsequent connections to this database it will appear as though
<code class="literal">SET geqo TO off;</code> had been executed just before the
session started.
Note that users can still alter this setting during their sessions; it
will only be the default. To undo any such setting, use
<code class="literal">ALTER DATABASE <em class="replaceable"><code>dbname</code></em> RESET
<em class="replaceable"><code>varname</code></em>;</code>.
</p>
</div></body>
</html>
|