Re: Network Card Not Listening at Startup

From: Ludwig Isaac Lim <ludz_lim(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Network Card Not Listening at Startup
Date: 2022-02-10 11:45:20
Message-ID: 17924493.191302.1644493520901@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Thursday, February 10, 2022, 01:49:10 AM GMT+8, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

>> Ludwig Isaac Lim <ludz_lim(at)yahoo(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sergey Belyashov 2022-02-10 12:09:40 Invalid operation order while producing DB dump
Previous Message Karsten Hilbert 2022-02-10 10:55:51 Re: Proposed German Translation of Code of Conduct Policy