public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dominique Devienne <[email protected]>
To: David Barsky <[email protected]>
Cc: Ron Johnson <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Cc: Tom Lane <[email protected]>
Subject: Re: Option on `postgres` CLI to shutdown when there are no more active connections?
Date: Wed, 15 Oct 2025 11:51:32 +0200
Message-ID: <CAFCRh-9LPCnaueSBHTo0ia3K861nxNFfr1mOXWaqC=EDx8+6Ew@mail.gmail.com> (raw)
In-Reply-To: <CAPR5_5rRYkM9bO=KC_PY-Bj2Fw=t+maEYG+Am-UgaCHRTWyFsg@mail.gmail.com>
References: <CAPR5_5psNqCm1OQr5LL4v6z02Sh=2YHYUg8NY+3xMzfGHfKs+w@mail.gmail.com>
<[email protected]>
<CAPR5_5q2oCkw19rHb7oy-M0M0purWFM5Jc8ub5xDy_NdhUmRTw@mail.gmail.com>
<[email protected]>
<[email protected]>
<CAFCRh-94eXetAjtCURs5F0JZQr=kso0rVgVSEmWiSD7wA6VcMw@mail.gmail.com>
<CANzqJaDn_mVi4M0CbKnVNwK9RxYOneoCRmd_d69rbjBrwasuPQ@mail.gmail.com>
<CAFCRh--P93bF0gpkdvg4MzMNqq5gK=4eWFkmBDR0xw9dmFVAPQ@mail.gmail.com>
<[email protected]>
<CAFCRh--_14QR1_=vZvKVZkcA_1LRO-pQd2p6BBRMreyAv2_z6w@mail.gmail.com>
<CAPR5_5rRYkM9bO=KC_PY-Bj2Fw=t+maEYG+Am-UgaCHRTWyFsg@mail.gmail.com>
On Mon, Oct 13, 2025 at 9:19 PM David Barsky <[email protected]> wrote:
> > SQLite is fantastic, but it's type-system and lock-model are too restrictive,
> > for a general DB. Similar to David, I think PostgreSQL is close to my ideal
> > above, yet still far-enough (and perhaps unwilling enough, as a community)
> > to venture into embedded and localhost use-cases, that it's frustrating.
>
> Yup, Dominique understands what I want: Postgres' type system, query planner,
> and locking model, but _shades_ of SQLite's operational properties during local
> development. However, I don't really need Postgres to function like an embedded
> database; I just want the self-contained process cleanup. Connecting to Postgres
> over TCP over localhost is perfect for my use-case
Except postgres is actively hostile to localhost
testing by not supporting ephemeral TCP ports...
Why oh why???
My own servers are unit tested that way.
Why would postgres.exe prevent the use of port 0?
Any work-around that picks a "free" port is racy and ugly.
There's a clean idiom for that, and that's port 0. Why disable it?
I don't get it... --DD
D:\pdgm\trunk\psc2\pgdata>where postgres.exe
D:\pdgm\kits\trunk\postgresql\17.6\Win_x64_10_v17\bin\postgres.exe
D:\pdgm\trunk\psc2\pgdata>where initdb.exe
D:\pdgm\kits\trunk\postgresql\17.6\Win_x64_10_v17\bin\initdb.exe
D:\pdgm\trunk\psc2\pgdata>initdb -D .\test1 -U postgres -A trust
The files belonging to this database system will be owned by user "ddevienne".
...
Success. You can now start the database server using: pg_ctl -D
^"^.^\test1^" -l logfile start
D:\pdgm\trunk\psc2\pgdata>postgres -D .\test1 -p 0
2025-10-15 09:43:59.293 GMT [42288] FATAL: 0 is outside the valid
range for parameter "port" (1 .. 65535)
view thread (11+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Option on `postgres` CLI to shutdown when there are no more active connections?
In-Reply-To: <CAFCRh-9LPCnaueSBHTo0ia3K861nxNFfr1mOXWaqC=EDx8+6Ew@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox