Re: Background worker plus language handler for Andl: OK?

From: David Wilson <dw+pg(at)hmmz(dot)org>
To: david(at)andl(dot)org
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Background worker plus language handler for Andl: OK?
Date: 2016-04-25 09:23:15
Message-ID: 20160425092315.GA27065@k3
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Apr 25, 2016 at 03:18:30PM +1000, david(at)andl(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dave Cramer 2016-04-25 10:45:35 Re: [GENERAL] How does postgresql jdbc driver implement prepared batch?
Previous Message Albe Laurenz 2016-04-25 08:11:15 Re: Error: no connection to the server