Skip site navigation (1) Skip section navigation (2)

Re: 9.2RC1 wraps this Thursday ...

From: Amit kapila <amit(dot)kapila(at)huawei(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 9.2RC1 wraps this Thursday ...
Date: 2012-08-22 13:07:25
Message-ID: 6C0B27F7206C9E4CA54AE035729E9C382852D5D8@szxeml509-mbs (view raw or flat)
Thread:
Lists: pgsql-hackers
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.

With Regards,
Amit Kapila.
   

Attachment: defect_pg_ctl_admin_win32.patch
Description: text/plain (4.3 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2012-08-22 13:29:48
Subject: Re: 9.2RC1 wraps this Thursday ...
Previous:From: Ashutosh BapatDate: 2012-08-22 12:48:52
Subject: Expressions without type

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group