Re: pg_upgrade using appname to lock out other users

Christopher Browne <cbbrowne@gmail.com>

From: Christopher Browne <cbbrowne@gmail.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: "Ross J. Reedstrom" <reedstrm@rice.edu>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-06-16T15:15:50Z
Lists: pgsql-hackers
On Thu, Jun 16, 2011 at 1:48 PM, Bruce Momjian <bruce@momjian.us> wrote:
> Tom Lane wrote:
>> "Ross J. Reedstrom" <reedstrm@rice.edu> writes:
>> > As an operations guy, the idea of an upgrade using a random,
>> > non-repeatable port selection gives me the hebejeebees.
>>
>> Yeah, I agree.  The latest version of the patch doesn't appear to have
>> any random component to it, though --- it just expects the user to
>> provide port numbers as switches.
>
> Oh, you wanted pg_upgrade to pick a random port number?  I can do that,
> but how would it check to see it is unused?

If no port is specified, that *might* be a reasonable behavior, but it
certainly throws in a dose of the wrong sort of nondeterminism, hence
heebie-jeebies...
-- 
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"