1

This "services" appears to run /bin/true, but why? There is another [email protected] file as well, but why does this one exist at all? Yes, this is the entire file.

# systemd service for managing all PostgreSQL clusters on the system. This
# service is actually a systemd target, but we are using a service since
# targets cannot be reloaded.

[Unit]
Description=PostgreSQL RDBMS

[Service]
Type=oneshot
ExecStart=/bin/true
ExecReload=/bin/true
RemainAfterExit=on

[Install]
WantedBy=multi-user.target

2 Answers 2

1

This is just a dummy service, a trigger that starts the actual PostgreSQL through service dependencies. The /bin/true just makes it to look like it has started successfully, without actually doing anything.

1
  • Can you elaborate on how this starts all of the instances on a machine? Something I'm just missing here. The /bin/true now makes sense, but just don't see how it launches all of the instances......
    – boatcoder
    Oct 26, 2017 at 21:36
1

The comments at the top are clear and explain the use. Each cluster has its own unit file postgresql@version-cluster and they are all "PartOf=postgresql.service". Thus this unit allows one to start up all clusters with systemctl start postgresql and other services to depend on all clusters being in a particular state (e.g., started).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .