diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2022-10-12 10:51:11 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2022-10-12 10:51:31 -0400 |
commit | c6127303718cb25edab7de8bd6f76a0a1e31f3fb (patch) | |
tree | 6660ec1360e1bc747dcc0a0d7f393b9f7f856802 | |
parent | b10546ecf8266d2b368b98ccd491eeae5160e316 (diff) |
Doc: improve recommended systemd unit file.
Add
After=network-online.target
Wants=network-online.target
to the suggested unit file for starting a Postgres server.
This delays startup until the network interfaces have been
configured; without that, any attempt to bind to a specific
IP address will fail.
If listen_addresses is set to "localhost" or "*", it might be
possible to get away with the less restrictive "network.target",
but I don't think we need to get into such detail here.
Per suggestion from Pablo Federico.
Discussion: https://postgr.es/m/166552157407.591805.10036014441784710940@wrigleys.postgresql.org
-rw-r--r-- | doc/src/sgml/runtime.sgml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 479eb62f4ce..982fff3c3db 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -480,6 +480,8 @@ fi [Unit] Description=PostgreSQL database server Documentation=man:postgres(1) +After=network-online.target +Wants=network-online.target [Service] Type=notify |