Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Amir Rohan <amir(dot)rohan(at)zoho(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Greg Smith <gsmith(at)gregsmith(dot)com>
Subject: Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.
Date: 2015-12-07 22:43:36
Message-ID: 20151207224336.GE2763@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier wrote:

> > If that's not a hard-coded PG version number then I don't know
> > what it is. Maybe it would be better to use random() instead,
> > but surely this isn't good as-is.
>
> We would definitely want something within the ephemeral port range, so
> we are up to that:
> rand() * 16384 + 49152;

Yes, this seems to produce the correct range.

Thanks Noah and Tom for the review, and thanks Michael for the patch. I
pushed it. A slight fix was to change the chomp() call; it was always
returning 1 (number of elements chomped) so it tried to kill init.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-12-07 22:46:11 Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.
Previous Message Korry Douglas 2015-12-07 21:12:41 Re: Patch: Implement failover on libpq connect level.