pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: ssl tests fail due to TCP port conflict
Date: Wed, 05 Jun 2024 17:37:15 -0400
Message-ID: <914151.1717623435@sss.pgh.pa.us> (raw)
In-Reply-To: <adbe09a3-7782-4ba8-987b-a8498f469a17@dunslane.net>
References: <d6ee8761-39d1-0033-1afb-d5a57ee056f2@gmail.com>
	<6756fb60-aa5f-442c-90fb-5f29cd1658f0@dunslane.net>
	<be612e1b-ed89-0391-d3f3-657f27336a55@gmail.com>
	<adbe09a3-7782-4ba8-987b-a8498f469a17@dunslane.net>

Andrew Dunstan <andrew@dunslane.net> writes:
> On 2024-06-05 We 16:00, Alexander Lakhin wrote:
>> That is, psql from the test instance 001_ssltests_34 opened a 
>> connection to
>> the test server with the client port 50072 and it made using the port by
>> the server from the test instance 001_ssltests_30 impossible.

> Oh. (kicks self)

D'oh.

> Should we really be allocating ephemeral server ports in the range 
> 41952..65535? Maybe we should be looking for an unallocated port 
> somewhere below 41952, and above, say, 32767, so we couldn't have a 
> client socket collision.

Hmm, are there really any standards about how these port numbers
are used?

I wonder if we don't need to just be prepared to retry the whole
thing a few times.  Even if it's true that "clients" shouldn't
choose ports below 41952, we still have a small chance of failure
against a non-Postgres server starting up at the wrong time.

			regards, tom lane





view thread (14+ messages)  latest in thread

Message-ID: <914151.1717623435@sss.pgh.pa.us>
Permalink:  ../914151.1717623435@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/914151.1717623435@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andrew@dunslane.net, exclusion@gmail.com
  Subject: Re: ssl tests fail due to TCP port conflict
  In-Reply-To: <914151.1717623435@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox