all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#41786] [PATCH] doc: Explain how to use psql with peer authentication.
@ 2020-06-10  9:31 Pierre Neidhardt
  2020-07-25 19:11 ` Oleg Pykhalov
  0 siblings, 1 reply; 9+ messages in thread
From: Pierre Neidhardt @ 2020-06-10  9:31 UTC (permalink / raw)
  To: 41786

* 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.
---
 doc/guix.texi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 15e077a41c..1326be69e5 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -16787,6 +16787,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 su postgres -s /bin/sh
+createuser --interface
+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,
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-08-01 10:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-10  9:31 [bug#41786] [PATCH] doc: Explain how to use psql with peer authentication Pierre Neidhardt
2020-07-25 19:11 ` Oleg Pykhalov
2020-07-26 10:18   ` Pierre Neidhardt
2020-07-26 11:26     ` Oleg Pykhalov
2020-07-28 11:58       ` [bug#41786] [PATCH 1/2] services: postgresql: Provide postgresql commands Pierre Neidhardt
2020-07-28 11:58         ` [bug#41786] [PATCH 2/2] doc: Explain how to use psql with peer authentication Pierre Neidhardt
2020-07-28 18:02           ` Oleg Pykhalov
2020-08-01 10:03             ` Pierre Neidhardt
2020-07-28 11:59       ` [bug#41786] [PATCH] " Pierre Neidhardt

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.