Re: pg_upgrade failure on Windows Server - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: pg_upgrade failure on Windows Server
Date
Msg-id CAB7nPqTtE_NcBa9syo4m9beUOWOsGW+p1ctF6haUGi6GQxjbNQ@mail.gmail.com
Whole thread Raw
In response to Re: pg_upgrade failure on Windows Server  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: pg_upgrade failure on Windows Server  (Michael Paquier <michael.paquier@gmail.com>)
Re: pg_upgrade failure on Windows Server  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
On Thu, Mar 12, 2015 at 6:50 AM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Asif Naeem wrote:
>> Thank you Michael. Good suggestion, PFA updated patch, it don't have
>> dependency on "progname" global variable any more and expecting this value
>> as related function argument.
>
> We have another copy of this in pg_ctl, which looks pretty much
> identical except there's some additional stuff at the bottom.  Would it
> make sense to add those additional "Job"-related things as a separate
> routine, so that we can remove the duplicate copy of the "restricted
> token" code, and have pg_ctl use get_restricted_process from src/common
> instead?

Yes, looking at the code it makes sense.

> There is a further copy of very similar stuff in pg_regress.c, but what
> it does is slightly different; not sure how difficult it would be to
> refactor that one too.

In this part the only difference is a spawn of cmd /c, but I don't see
why it is useful to spawn a new command prompt here for this case, so
we could just drop this part. Looking at the log history, this has
been added since this code creation..

> Is this a backpatchable bug fix, or are we considering this only for the
> master branch?

It would be good to get that backpatched, that's something we really
miss now IMO. Now it modifies libpgcommon, so Windows packagers (me
being one) will certainly need to patch a bit stuff but that's a
one-line changer so it's not a big deal. And I imagine that this is
actually the reason why Asif reported that as a bug as well.
--
Michael

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pg_upgrade failure on Windows Server
Next
From: johnb@drsmash.co.za
Date:
Subject: BUG #12854: PG Admin 3 Restore/Import Button