Re: Proof of concept: standalone backend with full FE/BE protocol

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>
Subject: Re: Proof of concept: standalone backend with full FE/BE protocol
Date: 2012-09-10 03:29:01
Message-ID: 008f01cd8f04$6c4959c0$44dc0d40$@kapila@huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sunday, September 09, 2012 8:46 PM Tom Lane wrote:
Amit kapila <amit(dot)kapila(at)huawei(dot)com> writes:
>> 1. does this follow the behavior that admin users will not be allowed to
invoke postgres child process?

> That's an interesting question. I'm not sure if we'd want to disable
> the no-root check on the Unix side, but it might make sense to. But
> this has no bearing on what libpq does, does it?

No, it has no bearing with what libpq does. Its only related to postgres
invocation, because as soon as postgres get invoked, it first checks about
root. If we want the root check can be avoided easily by checking argv.

>> 2. to find standalone_backend incase user didn't input, do we need
mechanism similar to getInstallationPaths()?

> No. There is no reason at all for libpq to think it is part of a
> postgres-supplied program, so it can't use any relative-path tricks,
> even if it had the program's argv[0] which it does not. Either the
> compiled-in path works, or the user has to give one.

> (But having said that, if Windows provides a way for a DLL to find
> out its own filesystem location, maybe relative path from there would
> work.)

At first, I shall go ahead with the current way (Either the
compiled-in path works, or the user has to give one.).

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2012-09-10 03:29:20 Re: Minor document updates
Previous Message Andrew Dunstan 2012-09-09 21:18:23 Re: build farm machine using <make -j 8> mixed results