Re: pg_upgrade does not completely honor --new-port

Bruce Momjian <bruce@momjian.us>

From: Bruce Momjian <bruce@momjian.us>
To: Devrim GÜNDÜZ <devrim@gunduz.org>
Cc: PostgreSQL Hackers ML <pgsql-hackers@postgresql.org>
Date: 2012-09-27T02:06:50Z
Lists: pgsql-hackers

Attachments

On Tue, Sep 25, 2012 at 05:36:54PM +0300, Devrim Gunduz wrote:
> 
> Hi,
> 
> I just performed a test upgrade from 9.1 to 9.2, and used --new-port
> variable. However, the analyze_new_cluster.sh does not include the new
> port, thus when I run it, it fails. Any chance to add the port number to
> the script?

Well, the reason people normally use the port number is to do a live
check, but obviously when the script is created it isn't doing a check. 
I am worried that if I do embed the port number in there, then if they
change the port after the upgrade, they now can't use the script.  I
assume users would have PGPORT set before running the script, no?

> Also, is it worth to add the value specified in --new-bindir as a prefix
> to vacuumdb command in the same script?

Wow, I never thought of adding a path to those scripts, but it certainly
makes sense.  I have created the attached patch which does this.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +