Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 98196153906F for ; Wed, 13 Jun 2012 12:14:31 -0300 (ADT) Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SepHA-00083d-H9 for pgsql-bugs@postgresql.org; Wed, 13 Jun 2012 15:14:30 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1SepGw-0004Ih-2d; Wed, 13 Jun 2012 11:14:14 -0400 Date: Wed, 13 Jun 2012 11:14:14 -0400 From: Bruce Momjian To: Dave Page Cc: Tom Lane , Edmund Horner , pgsql-bugs@postgresql.org Subject: Re: 9.2 beta2 - pg_ctl crashes on Win32 when neither PGDATA nor -D specified Message-ID: <20120613151414.GD4419@momjian.us> References: <9940.1339467780@sss.pgh.pa.us> <20120613145101.GB4419@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 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 (-) X-Archive-Number: 201206/125 X-Sequence-Number: 33352 On Wed, Jun 13, 2012 at 04:08:20PM +0100, Dave Page wrote: > On Wed, Jun 13, 2012 at 3:51 PM, Bruce Momjian wrote: > > On Mon, Jun 11, 2012 at 10:23:00PM -0400, Tom Lane wrote: > >> Hm, that patch seems to be several bricks shy of a load.  I will fix > >> two obvious bugs in it: > >> > >> (1) not dump core on boxes where printf("%s", NULL) dumps core; > >> > >> (2) not try to call adjust_data_dir before complaining for lack of > >> a -D switch; since adjust_data_dir does not do anything to the value > >> of pg_config, it's just silly to do things in that order. > >> > >> However, > >> > >> > I note that "postgres -C data_directory" will refuse to run on the > >> > command line because I've got admin privileges in Windows, and that > >> > pg_ctl normally starts postgres.exe using CreateRestrictedProcess. > >> > But it does not do so for the popen call in adjust_data_dir. > >> > >> if that actually is a third bug, as seems likely, somebody with access > >> to a windows environment will need to deal with it. > > > > I think you have to use RUNAS when using 'pg_ctl' or 'postgres' on Windows. > > pg_ctl should work as an administrative user, as it'll irrevocably > drop unwanted privileges. postgres won't though. The user was geting an error trying to start the postmaster, which I think matches your description. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +