Server start with systemd and configured with IP address

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: pablito(dot)federico(at)gmail(dot)com
Subject: Server start with systemd and configured with IP address
Date: 2022-10-11 20:52:54
Message-ID: 166552157407.591805.10036014441784710940@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/server-start.html
Description:

The url of the document is
https://www.postgresql.org/docs/current/server-start.html
My suggestion is add to the documentation in the segment that shows the
systemd entry inside the [Unit] segment the line
After=network-online.target

I saw in several sites that most people recommends using
After=network.target

but this will fail if the server is configured to listen on a specific IP
address instead of just localhost or 127.0.0.1
the differences between them is explained here
https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/#conceptsinsystemd
TLDR; network.target is after the network is up (but presumably without
address set, just the network stack) and network-online.target is after an
IP address has been set.

Best Regards
Pablo.

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2022-10-12 14:08:29 Section 9.7.3.2. Bracket Expressions should be rewritten
Previous Message Bruce Momjian 2022-10-11 17:00:36 Re: Clarifying docs on nuance of select and update policies