help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running postgres with shepherd as user-level service?


From: Joshua Branson
Subject: Re: Running postgres with shepherd as user-level service?
Date: Mon, 21 Dec 2020 16:43:17 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hey Carlo,

I am SUPER NOT a guix developer, but I figured I'd respond to your
email.  Please bear in mind I am making this up as I go along.  :)

It sounds like your user postgresql service is not even generating a
postgresql config file.  It sounds like it is error-ing out before
anything useful happens.  Specifically in while I assume in a guile
procedure call to "fport_write".  You may need to get into debugging the
shepherd.  The GNU Guile manual has a section of debugging the shepherd.
It's not as pretty as debugging elisp code.  (I really hope someone
making the debugging guile code as awesome as debugging elisp).

Let's test the assumption that your user service of postgresql is NOT
generating any postgresql config file.  I would ensure that /gnu/store
has NO postgresql config files.  To do this, remove postgresql from your
user profile, and ensure that you DO not have a running postgresql
service definition in config.scm.  Then do a guix gc.  Now do something
like:

I think this is the right syntax for a recursive grep...
#+BEGIN_SRC sh
grep -r postgresql /gnu/store
#+END_SRC

Check for any files and directories that grep shows.  Do you see any
postgresql configuration files?

I would try to load the service as you did before via 'herd load root
postgres.scm' and then do a

#+BEGIN_SRC sh
cat /var/log/messages
#+END_SRC

You could also try looking at where postgresql logs files, but again it
doesn't sound like postgresql is even generating the config file...
https://www.postgresql.org/docs/9.1/runtime-config-logging.html

When I was debugging my system nginx service, I found it useful to
discover what nginx file guix generated.  Currently the shepherd doesn't
have a way to show you the generated file, but you can do a recursive
grep and try to find said config file. 

You can also try to take a look at the system postgresql service
definition in guix-src/gnu/services/databases.scm.

Best of luck,

Joshua

P.S.  If the above fails, try dipping an orange in a big barrel of
pickle juice, speak the incantation "Relational Databases are fantastic"
5 times, and gently pat your computer thinking the positive affirmation
"you are adorable".  :)

--
Joshua Branson
Sent from Emacs and Gnus
  https://gnucode.me
  https://video.hardlimit.com/accounts/joshua_branson/video-channels
  https://propernaming.org
  "You can have whatever you want, as long as you help

enough other people get what they want." - Zig Ziglar



reply via email to

[Prev in Thread] Current Thread [Next in Thread]