Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHr5Z-0003iD-4g for pgsql-general@arkaria.postgresql.org; Wed, 09 Feb 2022 17:49:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nHr5Y-00017i-0p for pgsql-general@arkaria.postgresql.org; Wed, 09 Feb 2022 17:49:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHr5X-000170-Mt for pgsql-general@lists.postgresql.org; Wed, 09 Feb 2022 17:49:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nHr5V-0001o2-9a for pgsql-general@postgresql.org; Wed, 09 Feb 2022 17:49:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 219Hn3jj1433799; Wed, 9 Feb 2022 12:49:04 -0500 From: Tom Lane To: Ludwig Isaac Lim cc: "pgsql-general@postgresql.org" Subject: Re: Network Card Not Listening at Startup In-reply-to: <1854983886.1394387.1644424343951@mail.yahoo.com> References: <1854983886.1394387.1644424343951.ref@mail.yahoo.com> <1854983886.1394387.1644424343951@mail.yahoo.com> Comments: In-reply-to Ludwig Isaac Lim message dated "Wed, 09 Feb 2022 16:32:23 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1433797.1644428943.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 09 Feb 2022 12:49:03 -0500 Message-ID: <1433798.1644428943@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ludwig Isaac Lim writes: > How do make sure that NIC will be listening every time I started/restart= ed 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=3Dnetwork-online.target Wants=3Dnetwork-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