unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Carlo Holl <mail@carlo.red>
To: help-guix@gnu.org
Subject: Running postgres with shepherd as user-level service?
Date: Fri, 11 Dec 2020 01:07:18 -0800
Date: Fri, 11 Dec 2020 09:07:19 GMT	[thread overview]
Message-ID: <20201211090718.euypj7n2sqd62jeh@cehdev> (raw)


Hello Guix!

I'm struggling to find the right incantation to start a postgresql service with
shepherd outside of a system context.

Suppose the following snippet (postgres.scm):

(use-modules (gnu services)              (gnu packages databases)              
(gnu services databases))

(define pg-service   (service postgresql-service-type     
(postgresql-configuration       (postgresql postgresql)
       (data-directory "path-to-data-dir"))))

(register-services pg-service)
(start pg-service)


If I run the above with 'herd load root postgres.scm', I get:

     Loading postgres.scm.
     herd: exception caught while executing 'load' on service 'root':
     In procedure fport_write: Input/output error

Firstly, I'm not sure this is the right approach. Are the services defined in
say (gnu services databases) supposed to be run outside of system config context?

Secondly, I don't know how to go about diagnosing the issue since I'm not given
a stack trace and I don't know where to get a more detailed log of the 
failure. The shepherd log file just shows 'Loading postgres.scm' for 
every invocation of
the herd command.

A point in the right direction would be greatly appreciated.

-Carlo


             reply	other threads:[~2020-12-11 12:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11  9:07 Carlo Holl [this message]
2020-12-21 21:43 ` Running postgres with shepherd as user-level service? Joshua Branson
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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20201211090718.euypj7n2sqd62jeh@cehdev \
    --to=mail@carlo.red \
    --cc=help-guix@gnu.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).