pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ludwig Isaac Lim <ludz_lim@yahoo.com>
To: pgsql-general@postgresql.org
Subject: Re: Network Card Not Listening at Startup
Date: Thu, 10 Feb 2022 11:45:20 +0000 (UTC)
Message-ID: <17924493.191302.1644493520901@mail.yahoo.com> (raw)
In-Reply-To: <1433798.1644428943@sss.pgh.pa.us>
References: <1854983886.1394387.1644424343951.ref@mail.yahoo.com>
	<1854983886.1394387.1644424343951@mail.yahoo.com>
	<1433798.1644428943@sss.pgh.pa.us>





> On Thursday, February 10, 2022, 01:49:10 AM GMT+8, Tom Lane <tgl@sss.pgh.pa.us> wrote: 




>> Ludwig Isaac Lim <ludz_lim@yahoo.com> writes:

>> How do make sure that NIC will be listening every time I started/restarted the server?


> You need to tell systemd not to start the postgresql service
> until the network is up.

> In basic cases, you can edit the postgresql.service file,
> or maybe better create an add-on config file something like this:

> $ cat /etc/systemd/system/postgresql.service.d/delay_start.conf 
> [Unit]
> After=network-online.target
> Wants=network-online.target

> (The add-on file name doesn't matter, the directory name does.)

> I'm not certain that this will wait for custom NICs if you are
> doing something nonstandard to configure those, but for me
> it works for alternate IPs configured in
> /etc/sysconfig/network-scripts/ifcfg-whatever.

>            regards, tom lane

Thanks Tom. It works.

Regards,
Ludwig





view thread (3+ messages)

Message-ID: <17924493.191302.1644493520901@mail.yahoo.com>
Permalink:  ../17924493.191302.1644493520901@mail.yahoo.com/
Also on:    postgresql.org/message-id/17924493.191302.1644493520901@mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ludz_lim@yahoo.com
  Subject: Re: Network Card Not Listening at Startup
  In-Reply-To: <17924493.191302.1644493520901@mail.yahoo.com>
  References: <1854983886.1394387.1644424343951.ref@mail.yahoo.com> <1854983886.1394387.1644424343951@mail.yahoo.com> <1433798.1644428943@sss.pgh.pa.us> <17924493.191302.1644493520901@mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox