Peter Eisentraut <peter_e@gmx.net> writes:
> I think the complete solution here is something like
> random_port=$(secret algorithm)
> PGPORT=$random_port
> PGOLDPORT=$random_port
> PGNEWPORT=$random_port
> export PGPORT PGOLDPORT PGNEWPORT
Sounds reasonable, will do.
regards, tom lane