Re: Option on `postgres` CLI to shutdown when there are no more active connections? - Mailing list pgsql-general

From Tom Lane
Subject Re: Option on `postgres` CLI to shutdown when there are no more active connections?
Date
Msg-id 93702.1760321769@sss.pgh.pa.us
Whole thread Raw
In response to Re: Option on `postgres` CLI to shutdown when there are no more active connections?  (Rob Sargent <robjsargent@gmail.com>)
Responses Re: Option on `postgres` CLI to shutdown when there are no more active connections?
List pgsql-general
Rob Sargent <robjsargent@gmail.com> writes:
> On 10/12/25 16:10, David Barsky wrote:
>>> Postgres is not an embedded database, if you want that experience then
>>> use a database that is designed to be embedded.

>> That's fair, especially from an operational standpoint. However, I _think_
>> Postgres can get really close to an embedded database's development 
>> experience
>> by doing a few tricks that I'll elaborate on later on in this email.

> Were I a betting man, I would bet heavily against this community, which 
> prides itself on NOT losing data, allowing an option that would do just 
> that.

Well, mumble ... we have any number of options that can be read that
way.  One obvious one is that we don't try to prevent you from putting
$PGDATA on a RAM disk.  Turning off fsync is another popular way to
trade away durability for speed.

But I concur with the point that we're not here to pretend to be an
embedded database, as there are other projects that do that better
(for example, our good friends at SQLite).

The advice I'd give the OP is to take a look at our TAP-test
infrastructure.  We've put a good deal of effort, and are continuing
to do so, into letting those tests spin up transitory testing
databases pretty cheaply.

            regards, tom lane



pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: Option on `postgres` CLI to shutdown when there are no more active connections?
Next
From: Dominique Devienne
Date:
Subject: Re: Option on `postgres` CLI to shutdown when there are no more active connections?