Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Excerpts from Tom Lane's message of mar ago 21 10:47:41 -0400 2012:
>> * pg_ctl crashes on Win32 when neither PGDATA nor -D specified
>>
>> I'm not sure that this qualifies as a release blocker either --- isn't
>> it a plain-vanilla pre-existing bug? And what does the proposed patch
>> have to do with the stated problem? (Even if you define the problem
>> as "make sure we're restricted" rather than the stated symptom, the
>> patch looks rather fragile and Rube Goldbergian ... isn't there a way
>> to actually test if we're in a restricted process?)
> You mean, test if we're in a restricted process, and then refuse to run
> unless that is so? That would be a simple way out of the problem, but
> I'm not really sure that it "fixes" the issue because Win32 people
> normally expects stuff to run by dropping privs internally.
Well, what the proposed patch does is fix the permissions problem by
re-executing pg_ctl in a restricted process. What I was unhappy about
was the mechanism for deciding it needs to do that: I think it should
be something less easily breakable than looking for an environment
variable.
And I still don't see what that has to do with failing if the data
directory isn't specified. Surely that should just lead to
pg_ctl: no database directory specified and environment variable PGDATA unsetTry "pg_ctl --help" for more information.
If that doesn't work on Windows, isn't there something else wrong
altogether?
regards, tom lane