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 1t8KWU-003VOC-Mk for pgsql-general@arkaria.postgresql.org; Tue, 05 Nov 2024 14:27:10 +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 1t8KWR-00E4J7-VA for pgsql-general@arkaria.postgresql.org; Tue, 05 Nov 2024 14:27:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t8KWR-00E4Iu-G4 for pgsql-general@lists.postgresql.org; Tue, 05 Nov 2024 14:27:08 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t8KWP-000JXH-HH for pgsql-general@postgresql.org; Tue, 05 Nov 2024 14:27:06 +0000 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-539e4b7409fso5229850e87.0 for ; Tue, 05 Nov 2024 06:27:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730816823; x=1731421623; 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=/RRAbjKRtsweXVpiXdX6vZxOrjVNTdaxdntJ2qxJhW0=; b=lxi/AgxBFdkoS5zrgRjvNZUnYrXzAuXX4O61wtzFvp+rRC0wZbXohtRoL8fnTH5J5Y XmnSZ9vN9FV5lOyeqzK5NrZA1LFJoBsEz12g6tELbpijmWX2LQCVdX3zMNxKKDk+dn69 021Wa593UasZBAuT6fQYDdX7n7YeXzgxg8nOLpbOKbbAlH2Q1lulghoTJkOzp0zO///C 9Lt9blGT1D6O3+B9dShH2b5lGEjmwQ9uAyBOY3XrRvmcpwy83kKBcVpf8vctiUUA6Z/v uDTQhqmgm/GBAbD3+CkJldHn+ekRI87lZivvDr5KEdYeXQ+ETf0btcEBTLTVkO7md82d mLAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730816823; x=1731421623; 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=/RRAbjKRtsweXVpiXdX6vZxOrjVNTdaxdntJ2qxJhW0=; b=Ms8debQo5eJQQK8o7FbcVzjU7ZnPU1jrMiwXjjgoyaSYauz+BGmjUgLO849E9mQwVp aDmgC9kPWA6pff+oPQemcCoOMjKSPxB76WewcSt1XEnYVsiBr+e8WD1Gs1EeC3FZ6ROK PB3VeFT779Pkbn38AEd0NrZxgkifDUBOQE7NYhnoh8u2wKhwfZg40p1ykZX79VpC3sgj so+8vMydFoEIZVLXyLNXlu+H0e5fJY2Z305yAVksxVXHiyU1UL7U3y2h3L3fkMb4DGcx lXp96ubinysdAkaKDUwm1ftQdGWr2b/r6Z8A8dPM1gvgrF/1gWICfT6IofVdl6/t8v+e UCmQ== X-Gm-Message-State: AOJu0YznV0RspBTCsqsD+rB1/D7praaMHepHP9x4VpbM5YOCQiutFI5b dz3hBsF3SZvedQYbusfM4hku1BPyXtO7lVqSK7J9AraCMa2vcCBqwFNUcQD66BN4lXsrBTyMsS5 D+lCqlpORmpUOL7uEs2G8GpI5xC0= X-Google-Smtp-Source: AGHT+IF9WVwaU3Oml2fKMSyJzx2stntbiFq3sh9/PMJdoV2FX30Qc06Wdbq1hTn0Yyyv0o/+2+GuEsGKP4hUeiZ3rbU= X-Received: by 2002:ac2:5f51:0:b0:539:e873:6d4 with SMTP id 2adb3069b0e04-53c7bc0c8f2mr5761548e87.22.1730816823036; Tue, 05 Nov 2024 06:27:03 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Saul Perdomo Date: Tue, 5 Nov 2024 09:26:46 -0500 Message-ID: Subject: Re: Postgres listens on random port To: Kal Cc: pgsql-general@postgresql.org Content-Type: multipart/alternative; boundary="000000000000e8990706262b316c" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000e8990706262b316c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable " 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 listen= s > 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 > --000000000000e8990706262b316c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
" But the database actually listens on some random po= rt like 20011"

How exactly did you determine this?<= /div>

(If you used, say, netstat, can you share its outp= ut 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 listen= s on a random port different from the one which was specified in pg_ctl sta= rt command.

This occurs = in windows. When postgres is started on port 5460, the logs denote that pos= tgres 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 norm= al and admin users.

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


Regards=C2=A0
Kal
--000000000000e8990706262b316c--