me
/
guix
Archived
1
0
Fork 0

doc: Explain how to use psql with peer authentication.

* doc/guix.texi (Database Services): Add example of shell commands to use psql
as  system user.  Also add troubleshooting tip when service fails to start
because of incompatible cluster.
master
Pierre Neidhardt 2020-06-10 11:29:04 +02:00
parent 3bf4761e39
commit 1f0a41e955
No known key found for this signature in database
GPG Key ID: 9BDCF497A4BBCC7F
1 changed files with 18 additions and 0 deletions

View File

@ -17260,6 +17260,24 @@ The PostgreSQL daemon loads its runtime configuration from @var{config-file},
creates a database cluster with @var{locale} as the default
locale, stored in @var{data-directory}. It then listens on @var{port}.
If the services fails to start, it may be due to an incompatible
cluster already present in @var{data-directory}. Adjust it (or, if you
don't need the cluster anymore, delete @var{data-directory}), then
restart the service.
Peer authentication is used by default and the @code{postgres} user
account has no shell, which prevents the direct execution of @code{psql}
commands as this user. To use @code{psql}, you can temporarily log in
as @code{postgres} using a shell, create a PostgreSQL superuser with the
same name as one of the system users and then create the associated
database.
@example
sudo -u postgres -s /bin/sh
createuser --interactive
createdb $MY_USER_LOGIN # Replace appropriately.
@end example
@cindex postgresql extension-packages
Additional extensions are loaded from packages listed in
@var{extension-packages}. Extensions are available at runtime. For instance,