Re: Background worker plus language handler for Andl: OK? - Mailing list pgsql-general

From David Wilson
Subject Re: Background worker plus language handler for Andl: OK?
Date
Msg-id 20160425092315.GA27065@k3
Whole thread Raw
In response to Background worker plus language handler for Andl: OK?  (<david@andl.org>)
Responses Re: Background worker plus language handler for Andl: OK?
List pgsql-general
On Mon, Apr 25, 2016 at 03:18:30PM +1000, david@andl.org wrote:

> It seems to me that it should be possible to create a language front
> end for Andl by creating a background worker and a language handler.

I've been reading your posts over the past few days and while I find it
fun to follow, I can't help but wonder why there there is urgency in
reimplementing a protocol within PG itself.

It seems to me this is a much larger undertaking than you realize, for
example, you would at least need to reinvent PG's existing
authentication and authorization mechanisms, or perhaps patch PG somehow
to expose them usefully to your own code.

Is there a hard requirement that this stuff be in-process? Most of the
cost of a SQL query will be lost in planning and execution, the actual
time spent copying some strings around and context switching will be
pretty minimal for a query of any significance.

If I were you I'd start with building a robust proxy server first,
serving up your custom protocol and rewriting it to a PG client
connection internally, and only then look at how that might be merged
in-proess if indeed there was a real need for it.


David


pgsql-general by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: Error: no connection to the server
Next
From:
Date:
Subject: Re: Background worker plus language handler for Andl: OK?