[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#30701] [PATCH 2/4] services: Use a external pid file for PostgreSQL
[bug#30701] [PATCH 2/4] services: Use a external pid file for PostgreSQL.
Mon, 05 Mar 2018 08:27:55 +0000
mu4e 0.9.18; emacs 25.3.1
Christopher Baines <address@hidden> writes:
> Clément Lassieur <address@hidden> 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
> 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.
Description: PGP signature
[bug#30701] [PATCH 1/4] services: Rework the PostgreSQL config file to use a record type., Clément Lassieur, 2018/03/04
[bug#30701] [PATCH 1/3] services: Rework the PostgreSQL config file to use a record type., Christopher Baines, 2018/03/05
[bug#30701] [PATCH 3/3] services: databases: Add postgresql-configuration record exports., Christopher Baines, 2018/03/05