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

From Bruce Momjian
Subject Re: pg_upgrade failure on Windows Server
Date
Msg-id 20150121181411.GD3885@momjian.us
Whole thread Raw
In response to Re: pg_upgrade failure on Windows Server  (Asif Naeem <anaeem.it@gmail.com>)
Responses Re: pg_upgrade failure on Windows Server  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
On Tue, Jan 20, 2015 at 10:41:41PM +0500, Asif Naeem wrote:
> Above setting is available in Windows Server 2003, If I change this policy
> setting from “Administrators group" to "object creator", pg_upgrade work
> without issue. Unfortunately it got obsolete in later version of Windows
> Server. On Windows Server 2008, there seems workaround available i.e. http://
> support.microsoft.com/kb/947721 but it did not worked for me.
>
> PFA patch. To run pg_upgrade (and its child processes) without administrative
> privileges (when available), I have copied restricted token logic from src/bin/
> initdb/initdb.c, that enables pg_upgrade to rerun itself with removed
> Administrators group privileges, this way it create files with the ownership of
> user running pg_upgrade. With the patch applied, pg_upgrade (or its child
> process) don’t create files with administrators group owner and works fine
> without issue.
>
> As pg_resetxlog change file in data directory, it do suffer from same
> permission issue, it also require similar changes. PFA for pg_resetxlog fix.
> Please do let me know if I missed something or more information is required.
> Thanks.

This sounds like the exact right patch.  However, since it has a lot of
Windows-specific code, and we don't have any Windows experts, I am not
sure how this can be applied.

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

  + Everyone has their own god. +

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #12617: DETAIL: Could not read from file "pg_subtrans/06F8" at offset 90112: Success.
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #12537: It is not possible to configure postgres to use same timezone of the server.