Re: pg_upgrade failure on Windows Server

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Asif Naeem <anaeem(dot)it(at)gmail(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: pg_upgrade failure on Windows Server
Date: 2015-01-21 18:14:11
Message-ID: 20150121181411.GD3885@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-bugs by date

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