unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Running postgres with shepherd as user-level service?
@ 2020-12-11  9:07 Carlo Holl
  2020-12-21 21:43 ` Joshua Branson
  0 siblings, 1 reply; 3+ messages in thread
From: Carlo Holl @ 2020-12-11  9:07 UTC (permalink / raw)
  To: help-guix


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


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

end of thread, other threads:[~2021-02-12  5:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-11  9:07 Running postgres with shepherd as user-level service? Carlo Holl
2020-12-21 21:43 ` Joshua Branson
2021-02-12  3:16   ` Services related project for GSoC? Was: " raingloom

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).