Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t8Kdm-003WQg-5t for pgsql-general@arkaria.postgresql.org; Tue, 05 Nov 2024 14:34:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t8Kdi-00E9Tw-Tk for pgsql-general@arkaria.postgresql.org; Tue, 05 Nov 2024 14:34:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t8Kdi-00E9Tn-Iq for pgsql-general@lists.postgresql.org; Tue, 05 Nov 2024 14:34:39 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t8Kdf-000KmL-Fd for pgsql-general@postgresql.org; Tue, 05 Nov 2024 14:34:38 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43155afca99so40432985e9.1 for ; Tue, 05 Nov 2024 06:34:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730817275; x=1731422075; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=S6qhki1KMm583+1nuSiO5BhWtpvD/qWbEP/m972g/rM=; b=NcDxQSkVvrNKHsBGcpJ0y29BMKY1JWOwFOqUvpkmhVVdolHVU72p5m193/QTLNbX8R lIehXIR2UNaK+lzPXSIurG8f7JZTvmUHXPy839ZOBTRaMmLIFPIlWPzk5qQZXustZ4xb pw6HPSRCigjbMcdngNSV3jskLkSHBBtNJS5JavrVouEiVtf99Y6lw+yRfffLhfXJBroG G8LvPBoHbjA5557ihmmrsZYt+34StfgbLAhLgxRn3RExU5rMWZynkuQruNINfyIlvVsE kcVoMwfNZgTTWWoNWuhmVNHzVJs//M1N7U+fjgFqKB1YoQFVyvW51jDQjw4ZkM0Qkrpv ElPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730817275; x=1731422075; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=S6qhki1KMm583+1nuSiO5BhWtpvD/qWbEP/m972g/rM=; b=aDqF0F+Es5jTIgf414jlQc2IuFNSgMgUK71roy2d8acYMAU6AD0UyJtCHZlMGEfjyU k8kbWqWbXMhh4+G8ELczuyGpx1oKdafh6Gw8gSzBEWJP8yaBABxGkurmZQbQfnffQSHs YU8gVXt1lwA84gyB+jaA4Rbd9EWvYP7sEKMec1uKtNj3yEWZzYwbAHvZKPM1btVjwQQ5 unWJHxbmhoUhqmgFVYOCHCe0pJJUNiQq0ttgqWolqnFx7zYnf/31SDJsr9HFdaDOyt3z M2zZE/0mKN8Afq0q0YHR++/vWzS7qPsXka/p139t6g0MNv8c8YdXGcibysTmpKn8xgHz NPzQ== X-Gm-Message-State: AOJu0YzQ53gC29G6UKPLTdEGlny557jh1ymA8YEs6eHQ1dCqkwuauhXM bVgthDSheIE+w2E97/E1cR+DKKL9/wPFI3cv//Pi8E7YLhKPkomIrmLe7OvqMWUfrfCwjwQ56Lp b/vli2isEj828gZbAe81ixpQrpLQz7A== X-Google-Smtp-Source: AGHT+IEbTujv09uT5ULBkZDiSZjOsJpHu6R9ihTMJUopszYe/owWyx3HvktCZtyzRLiwy9T4Dv7YtHUjYmrHgPqYnDc= X-Received: by 2002:a05:600c:460f:b0:426:5e32:4857 with SMTP id 5b1f17b1804b1-4327d840fdemr151615825e9.0.1730817275336; Tue, 05 Nov 2024 06:34:35 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Kal Date: Tue, 5 Nov 2024 20:04:24 +0530 Message-ID: Subject: Re: Postgres listens on random port To: Saul Perdomo Cc: pgsql-general@postgresql.org Content-Type: multipart/alternative; boundary="000000000000de225b06262b4ca4" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000de225b06262b4ca4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi The netstat command did not reveal any entries on the intended port (say 5460). The 5460 port was vacant, no processes were using it. I had to crawl through the postgres processes on task manager to find the listening port. Could this be due interference from other services? But the port 5460 remains unused. Regards, Kal On Tue, 5 Nov 2024 at 7:57=E2=80=AFPM, Saul Perdomo wrote: > " But the database actually listens on some random port like 20011" > > How exactly did you determine this? > > (If you used, say, netstat, can you share its output with us?) > > On Tue, Nov 5, 2024 at 8:46=E2=80=AFAM Kal wrote= : > >> Hi >> >> I have a scenario in which postgres listens on a random port different >> from the one which was specified in pg_ctl start command. >> >> This occurs in windows. When postgres is started on port 5460, the logs >> denote that postgres is started on 5460. But the database actually liste= ns >> on some random port like 20011 >> >> When the same postgres is started as a service,it listens on the intende= d >> port. >> >> I have tried with both normal and admin users. >> >> Any suggestions on this behaviour will be helpful. >> >> >> Regards >> Kal >> > --000000000000de225b06262b4ca4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

The= netstat command did not reveal any entries on the intended port (say 5460)= . The 5460 port was vacant, no processes were using it.
=C2=A0I had to crawl through the postgres processes on task manager to = find the listening port.


Could this be due interference from other serv= ices? But the port 5460 remains unused.


Regards,=C2=A0
Kal

On Tue, 5 Nov 2024 at 7:57=E2=80=AFPM, Saul Perdomo <saul.perdomo@gmail.com> wrote= :
" But the database actual= ly listens on some random port like 20011"

How exac= tly did you determine this?

(If you used, say, net= stat, can you share its output with us?)

On Tue, Nov 5, 2024 at 8:46= =E2=80=AFAM Kal <kalel.code11@gmail.com> wrote:
Hi=C2= =A0

I have a scenario in which= postgres listens on a random port different from the one which was specifi= ed in pg_ctl start command.

This occurs in windows. When postgres is started on port 5460, the logs= denote that postgres is started on 5460. But the database actually listens= on some random port like 20011

When the same postgres is started as a service,it listens on the = intended port.

I have tr= ied with both normal and admin users.

Any suggestions on this behaviour will be helpful.=C2=A0


= Regards=C2=A0
Kal
--000000000000de225b06262b4ca4--