Re: pg_upgrade -u - Mailing list pgsql-general

From Ray Stell
Subject Re: pg_upgrade -u
Date
Msg-id 7E22E42E-C031-4E30-8844-1824AE76860C@vt.edu
Whole thread Raw
In response to Re: pg_upgrade -u  (Bruce Momjian <bruce@momjian.us>)
List pgsql-general
On May 21, 2013, at 2:41 PM, Bruce Momjian wrote:

> On Wed, May  8, 2013 at 08:52:40PM -0400, Bruce Momjian wrote:
>> On Wed, May  8, 2013 at 05:05:05PM -0400, Ray Stell wrote:
>>> A minor detail in 9.2.4, but I noticed that the pg_upgrade flag for
>>> superuser, -u, does not get carried to a -U flag on the vacuumdb commands
>>> written to analyze_new_cluster.sh.
>>
>> OK, let me look at this issue.
>
> I have thought about this and there are potentially several options
> specified to pg_upgrade that could be passed into scripts:
>
>  -O, --new-options=OPTIONS     new cluster options to pass to the server
>  -P, --new-port=NEWPORT        new cluster port number (default 50432)
>  -u, --user=NAME               cluster superuser (default "root")
>
> However, if we pass these items into the scripts, we then force these
> values to be used, even if the user wants to use a different value.  It
> is a balance between supplying defaults vs. requiring the user to supply
> or change the values used during the ugprade.
>
> At this point, I have favored _not_ supplying defaults in the script.
> Do you have an alternative argument in favor of supplying defaults?



Well, the story really began when I ran initdb with a -U arg.   vacuumdb takes the -U also, but pg_upgrade does not.

It seems like if I have to supply a -u in order to get pg_upgrade to function in the case where there is no default
superuserin the cluster, then an associated vacuumdb command requires a -U arg. 

Perhaps just documenting the behavior is all that is needed, but -U is everywhere and I think that's a good thing.

pgsql-general by date:

Previous
From: PG User
Date:
Subject: data file corruption
Next
From: Antonio Goméz Soto
Date:
Subject: Very simple select, using index for ordering, but not for selecting. How to make it faster?