Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YDznF-0005y0-Rz for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Jan 2015 18:14:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YDznF-00088S-98 for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Jan 2015 18:14:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YDznE-00088M-MO for pgsql-bugs@postgresql.org; Wed, 21 Jan 2015 18:14:16 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YDznB-0008Dh-Gs for pgsql-bugs@postgresql.org; Wed, 21 Jan 2015 18:14:15 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1YDzn9-0002Yi-5g; Wed, 21 Jan 2015 13:14:11 -0500 Date: Wed, 21 Jan 2015 13:14:11 -0500 From: Bruce Momjian To: Asif Naeem Cc: "pgsql-bugs@postgresql.org" Subject: Re: pg_upgrade failure on Windows Server Message-ID: <20150121181411.GD3885@momjian.us> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs