Re: postgresql embedded mode - Mailing list pgsql-general

From David G. Johnston
Subject Re: postgresql embedded mode
Date
Msg-id CAKFQuwYz_-PWtpmuO+tUMd_1eiRt-dJTPbgV-dxHfj3B3ExEtw@mail.gmail.com
Whole thread Raw
In response to Re: postgresql embedded mode  (Albe Laurenz <laurenz.albe@wien.gv.at>)
List pgsql-general
On Mon, May 23, 2016 at 9:17 AM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
David G. Johnston wrote:
> On Mon, May 23, 2016 at 6:54 AM, aluka raju <alukaraju2894@gmail.com> wrote:
>> As given in the FAQ's that postgresql cannot be embedded
>> https://wiki.postgresql.org/wiki/FAQ#Can_PostgreSQL_be_embedded.3F .
>>
>> Is their any possibility to make it embedded. Till now postgresql has not done this embedded
>> mode and i want to work on how it can be embedded and contribute. please help me how to start or
>> suggest the idea-.
>
> ​Step 1 - Fork the project...
>
> ​Changing the fundamental architecture of the system is not something I would expect a project with
> this long of history to attempt to do directly.  While the people working on the core product are
> welcome to spend their time however they like I don't imagine any of them would be willing to commit
> code to core pertaining to this capability.  Most, if not all, of them likely don't believe it is even
> a good idea generally.

There was this patch by Tom Lane in 2012:
http://www.postgresql.org/message-id/12511.1346631791@sss.pgh.pa.us

This can be used as something like an embedded database.
Nothing more happened with this patch, though.

​Good read.

​The patch as written was really geared toward making PostgreSQL's single-user mode accessible from psql - which itself is an administrative mode.

​The main concern is that if you give people an inch here they will take that capability and place in front of users ​and then complain that our product sucks when the database isn't being vacuumed and checkpoints aren't happening and there is no way to connect to the database externally while the application is running (or from programs that rely on JDBC for that matter).

There is a non-trivial gap between what that patch proposed to accomplish and what an embedded configuration would look like.

In reading the thread I wish Tom hadn't brought up the concept of embedded - and flatly rejected any attempt to allow it into the discussion (aside from discussion of potential real world use cases where people abuse the capability beyond what we explicitly document it to be supported for).

If someone were to present a fully functioning, well designed and documented, ideally in-the-wild, patch/fork of PostgreSQL that operates in embedded mode I'm sure the community and core would be willing to review it and render their multitude of opinions.  Beyond, and because of, that we are a FOSS community and the people involved are welcome to purse whatever endeavors they wish.  The aforementioned thread is a good start, though I suspect there is more material available, if someone were to consider going down this path.

David J.


pgsql-general by date:

Previous
From: Marc Mamin
Date:
Subject: revert function for to_json ?
Next
From: Marc Mamin
Date:
Subject: Re: revert function for to_json ?