Re: Postgres listens on random port - Mailing list pgsql-general

From Kal
Subject Re: Postgres listens on random port
Date
Msg-id CACO9DYJuXdaHL338ZftaQWM-ZR_DLq0Wpg-y3krzwOBai3eXsA@mail.gmail.com
Whole thread Raw
In response to Re: Postgres listens on random port  (Saul Perdomo <saul.perdomo@gmail.com>)
List pgsql-general
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 PM, Saul Perdomo <saul.perdomo@gmail.com> 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 AM Kal <kalel.code11@gmail.com> 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 listens on some random port like 20011

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

I have tried with both normal and admin users.

Any suggestions on this behaviour will be helpful. 


Regards 
Kal

pgsql-general by date:

Previous
From: Saul Perdomo
Date:
Subject: Re: Postgres listens on random port
Next
From: Ron Johnson
Date:
Subject: Re: Postgres listens on random port