From: Tom Lane [tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Tuesday, August 21, 2012 10:31 PM
Amit Kapila <amit(dot)kapila(at)huawei(dot)com> writes:
> [mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Tom Lane
>> * pg_ctl crashes on Win32 when neither PGDATA nor -D specified
>>> isn't there a way to actually test if we're in a restricted process?
>> Do you mean to say that it should check if pg_ctl runs as an administrative
>> user then do the re-fork in restricted mode.
> Something like that. The proposed patch depends on there not being a
> conflicting environment variable, which seems rather fragile to me.
> Can't we test the same condition that postgres.exe itself would test?
To implement the postgre.exe way we have following options:
1. Duplicate the function pgwin32_is_admin and related function to pg_ctl, as currently it is not exposed.
2. Make that visible to pg_ctl, but for that it need to link with postgre lib.
3. Move the functions to some common place may be src/port.
4. any other better way?
Curretly I have implemented the patch with Approach-1, but I believe Approach-3 would have been better.
However I was not sure which is the best place to move functions, so I have implemented with Approach-1.
Please let me know if the attached patch is acceptable. I shall wait today night for your confirmation and shall let you know before
I leave my work place in which case I shall complete tommorow morning but not sure whether that much delay is acceptable.
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2012-08-22 13:29:48|
|Subject: Re: 9.2RC1 wraps this Thursday ...|
|Previous:||From: Ashutosh Bapat||Date: 2012-08-22 12:48:52|
|Subject: Expressions without type|