postgres.git / summary / log / commit / refs

commit    59290b20aae73d334034d5a182eb0a2d7f451ebb
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Wed Oct 12 14:51:11 2022 +0000
First released in: 16.0, 10.23, 11.18, 12.13, 13.9, 14.6, 15.1

    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


doc/src/sgml/runtime.sgml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 1e3825b9686..d405d55785f 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -402,6 +402,8 @@ fi [Unit] Description=PostgreSQL database server Documentation=man:postgres(1) +After=network-online.target +Wants=network-online.target [Service] Type=notify [parent: 6c1de98bad93]