all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joshua Branson <jbranso@dismail.de>
To: Carlo Holl <mail@carlo.red>
Cc: help-guix@gnu.org
Subject: Re: Running postgres with shepherd as user-level service?
Date: Mon, 21 Dec 2020 16:43:17 -0500	[thread overview]
Message-ID: <878s9qzvgq.fsf@dismail.de> (raw)
In-Reply-To: <20201211090718.euypj7n2sqd62jeh@cehdev> (Carlo Holl's message of "Fri, 11 Dec 2020 01:07:18 -0800, Fri, 11 Dec 2020 09:07:19 GMT")


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	other threads:[~2020-12-21 21:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11  9:07 Running postgres with shepherd as user-level service? Carlo Holl
2020-12-21 21:43 ` Joshua Branson [this message]
2021-02-12  3:16   ` Services related project for GSoC? Was: " raingloom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878s9qzvgq.fsf@dismail.de \
    --to=jbranso@dismail.de \
    --cc=help-guix@gnu.org \
    --cc=mail@carlo.red \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.