Re: 9.2 beta2 - pg_ctl crashes on Win32 when neither PGDATA nor -D specified - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: 9.2 beta2 - pg_ctl crashes on Win32 when neither PGDATA nor -D specified
Date
Msg-id 20120613145101.GB4419@momjian.us
Whole thread Raw
In response to Re: 9.2 beta2 - pg_ctl crashes on Win32 when neither PGDATA nor -D specified  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: 9.2 beta2 - pg_ctl crashes on Win32 when neither PGDATA nor -D specified
List pgsql-bugs
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.

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

  + It's impossible for everything to be true. +

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PostgreSQL 9.2 beta1's pg_upgrade fails on Windows XP
Next
From: Dave Page
Date:
Subject: Re: 9.2 beta2 - pg_ctl crashes on Win32 when neither PGDATA nor -D specified