help-guix
[Top][All Lists]
Advanced

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

Running postgres with shepherd as user-level service?


From: Carlo Holl
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


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 via email to

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