23.4. Database Configuration

|   23.4. Database Configuration   |                             |                              |                  |                              |
|:--------------------------------:|-----------------------------|------------------------------|------------------|------------------------------|
|[Prev](manage-ag-templatedbs.html)|[Up](managing-databases.html)|Chapter 23. Managing Databases|[Home](index.html)| [Next](manage-ag-dropdb.html)|

---

## 23.4. Database Configuration

 Recall from [Chapter 20](runtime-config.html) that the PostgreSQL server provides a large number of run-time configuration variables. You can set database-specific default values for many of these settings.

 For example, if for some reason you want to disable the GEQO 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 `SET geqo TO off`. To make this setting the default within a particular database, you can execute the command:

```
ALTER DATABASE mydb SET geqo TO off;

```

 This will save the setting (but not set it immediately). In subsequent connections to this database it will appear as though `SET geqo TO off;` 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 `ALTER DATABASE *`dbname`* RESET *`varname`*`.

---

|[Prev](manage-ag-templatedbs.html)|[Up](managing-databases.html)| [Next](manage-ag-dropdb.html)|
|:---------------------------------|:---------------------------:|-----------------------------:|
|     23.3. Template Databases     |     [Home](index.html)      |  23.5. Destroying a Database |

 // \<![CDATA[ \<-- For SVG support if ('WebSocket' in window) { (function() { function refreshCSS() { var sheets = [].slice.call(document.getElementsByTagName("link")); var head = document.getElementsByTagName("head")[0]; for (var i = 0; i \< sheets.length; ++i) { var elem = sheets[i]; head.removeChild(elem); var rel = elem.rel; if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") { var url = elem.href.replace(/(&|\\?)\_cacheOverride=\\d+/, ''); elem.href = url + (url.indexOf('?') \>= 0 ? '&' : '?') + '\_cacheOverride=' + (new Date().valueOf()); } head.appendChild(elem); } } var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://'; var address = protocol + window.location.host + window.location.pathname + '/ws'; var socket = new WebSocket(address); socket.onmessage = function(msg) { if (msg.data == 'reload') window.location.reload(); else if (msg.data == 'refreshcss') refreshCSS(); }; console.log('Live reload enabled.'); })(); } // ]]\>