19.1. The PostgreSQL User Account

|19.1. The PostgreSQL User Account|                  |                                      |                  |                              |
|:-------------------------------:|------------------|--------------------------------------|------------------|------------------------------|
|      [Prev](runtime.html)       |[Up](runtime.html)|Chapter 19. Server Setup and Operation|[Home](index.html)| [Next](creating-cluster.html)|

---

## 19.1. The PostgreSQL User Account

[]()

 As with any server daemon that is accessible to the outside world, it is advisable to run PostgreSQL under a separate user account. This user account should only own the data that is managed by the server, and should not be shared with other daemons. (For example, using the user `nobody` is a bad idea.) In particular, it is advisable that this user account not own the PostgreSQL executable files, to ensure that a compromised server process could not modify those executables.

 Pre-packaged versions of PostgreSQL will typically create a suitable user account automatically during package installation.

 To add a Unix user account to your system, look for a command `useradd` or `adduser`. The user name postgres is often used, and is assumed throughout this book, but you can use another name if you like.

---

|         [Prev](runtime.html)         |[Up](runtime.html)|   [Next](creating-cluster.html)  |
|:-------------------------------------|:----------------:|---------------------------------:|
|Chapter 19. Server Setup and Operation|[Home](index.html)| 19.2. Creating a Database Cluster|

 // \<![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.'); })(); } // ]]\>