GNU bug report logs - #30701
[PATCH 0/4] PostgreSQL service changes (add record type, and system test)

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Sun, 4 Mar 2018 19:12:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


Message #35 received at 30701 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 30701 <at> debbugs.gnu.org
Subject: Re: [bug#30701] [PATCH 2/4] services: Use a external pid file for
 PostgreSQL.
Date: Mon, 05 Mar 2018 08:27:55 +0000
[Message part 1 (text/plain, inline)]
Christopher Baines <mail <at> cbaines.net> writes:

> Clément Lassieur <clement <at> lassieur.org> writes:
>
>> Plus, there is no reason to use make-forkexec-constructor on pg_ctl
>> because pg_ctl returns after it has checked that the daemon is running.
>> For the same reason, Shepherd doesn't need to know about Postgres' PID.
>> All the hard work is done by pg_ctl.
>
> As the comment I made at the top, I did this when I was writing the
> system test. If you remove this patch, when you call (start-service
> 'postgres), it will return #f if the service starts successfully. If you
> tweak the service to make it fail to start (e.g. by changing the "start"
> action to something else), you get the same observable behaviour,
> start-service returns #f.
>
> The way this works for other services, normally through
> make-forkexec-constructor is that calling start-service will return the
> PID.
>
> While the system test does still add some value even without checking if
> the service has started, doing so would be really good. Even if it's not
> using the PID file approach, maybe the exit code of pg_ctl could be
> used? I'm not really sure why it isn't working like that already, as
> invoke usually returns either #t or #f...

Ah, I've just realised why this is the case, I was misreading the system
test results, it does actually return #t/#f, but as the system test was
expecting a number, it just returns #f to indicate failure.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 7 years and 123 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.