Re: pg_upgrade failure on Windows Server

From: Asif Naeem <anaeem(dot)it(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: pg_upgrade failure on Windows Server
Date: 2015-03-12 09:33:08
Message-ID: CAEB4t-NLYHDET3cBM4vAqRJ-giBU0wuGag4SfdjB=KuZe2Z41Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.

Regards,
Muhammad Asif Naeem

On Thu, Mar 5, 2015 at 11:37 AM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
wrote:

> On Wed, Mar 4, 2015 at 10:53 PM, Asif Naeem wrote:
> > On Mon, Mar 2, 2015 at 9:42 AM, Michael Paquier wrote:
> >>
> >> The portion for initdb to make it use restricted tokens has been added
> >> some time ago with fc9c20e, and the one of pg_ctl with a25cd81, both
> >> of them in 2006, so instead of duplicating again the logic for
> >> pg_upgrade and pg_resetxlog, shouldn't we create a common routine in
> >> src/common and link to it all the frontend binaries that need it?
> >> Hence, Asif, could you refactor first the existing code and make it
> >> use a new API in libpqcommon?
> >
> > Sure. PFA patch, restricted token code is moved to
> > src/common/restricted_token.c, Now it uses common routine for initdb,
> > pg_upgrade and pg_resetxlog. Please do let me know if I missed something
> or
> > more information is required. Thanks.
>
> Thanks. This looks fine to me (tested on MinGW-32 and MSVC). I just
> have one comment: get_restricted_token should use progname as
> argument. This way you can just keep progname as a static variable for
> each frontend and not play with constant variables in both code paths,
> aka src/common and src/bin stuff.
>
> Regards,
> --
> Michael
>

Attachment Content-Type Size
restricted_token.v2.patch application/octet-stream 13.9 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Ronan Dunklau 2015-03-12 09:39:01 PGDump / copy bugs with "big lines" ?
Previous Message johnb 2015-03-12 05:40:34 BUG #12854: PG Admin 3 Restore/Import Button