Re: Merged Model for libpq

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Annamalai Gurusami <annamalai(dot)gurusami(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Merged Model for libpq
Date: 2011-04-01 21:33:15
Message-ID: AANLkTin4ETkbV6ixSg6ZJNVxR_t19c7ZWLRFGFnYJKwv@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 31, 2011 at 11:34 AM, Annamalai Gurusami
<annamalai(dot)gurusami(at)gmail(dot)com> wrote:
> Hi All,
>
> I would like to know about the best approach to take for providing a merged
> model of libpq library.  When I say "merged model" it means that the client
> and server would be running as a single process.  A single client libpq
> application can be linked to either the client-server libpq library or
> merged libpq library.  For more clarity here is a small flow diagram:
>
> Client Server Model:
>
> Application -> libpq library (cs) -> TCP/IP network -> libpq (backend) ->
> pgsql server
>
> Merged Model:
>
> Application -> libpq library (merged) -> pgsql server
>
> One approach that we are having in mind is to use the SPI interface and
> re-implement the libpq APIs.  Is there any other better approach?   Would it
> be possible to implement the client server protocol into an API interface,
> without involving the TCP/IP network?
>
> Your thoughts and suggestions on this would be highly appreciated.

One big issue with SPI that need to be aware of is that you have no
explicit transaction control Once you are in SPI land, you are in one
transaction and one transaction only -- this means all locks are held
indefinitely as well as other issues.

I don't think fully server side applications are practical until we
get stored procedures with explicit transaction control (and once we
have them, that's all i'll ever write if given a choice).

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-04-01 21:39:10 Re: pg_restore
Previous Message Josh Berkus 2011-04-01 18:41:20 Re: [GENERAL] Postgres 9.1 - Release Theme