Обсуждение: Client-only Meson Build From Sources

Поиск
Список
Период
Сортировка

Client-only Meson Build From Sources

От
Benjamin Leff
Дата:
Hello,

Are there any plans to support a client-only (no server) build in meson?

We currently maintain a libpq-standalone fork that we haven’t updated in about ~1 year and would like to deprecate if possible.

Here’s another alternative using CMake.

Thanks,
Ben

--
Benjamin W. Leff
(516) 754-3453
ltp|17609929361245280

Re: Client-only Meson Build From Sources

От
Peter Eisentraut
Дата:
On 20.10.25 22:43, Benjamin Leff wrote:
> Are there any plans to support a client-only (no server) build in meson?

I'm not aware of such plans.  But that doesn't mean somebody couldn't 
propose one.




Re: Client-only Meson Build From Sources

От
Tom Lane
Дата:
Peter Eisentraut <peter@eisentraut.org> writes:
> On 20.10.25 22:43, Benjamin Leff wrote:
>> Are there any plans to support a client-only (no server) build in meson?

> I'm not aware of such plans.  But that doesn't mean somebody couldn't 
> propose one.

Years ago we had support for client-only builds on at least some
toolchains (MSVC at least, not sure about elsewhere).  That got
dropped though.  I believe the prevailing opinion was that the amount
of time saved by not building all of PG didn't justify the maintenance
effort to keep the build scripts working for that case.  I think that
that argument hasn't lost its force, so we'd be likely to reject any
such proposal.

            regards, tom lane



Re: Client-only Meson Build From Sources

От
Benjamin Leff
Дата:
> I believe the prevailing opinion was that the amount
of time saved by not building all of PG didn't justify the maintenance
effort to keep the build scripts working for that case

IMO, it’s not just about time. For bare bones package managers when there’s no need to build the server, this saves a few GB.


--
Benjamin W. Leff
(516) 754-3453


On Tue, Oct 21, 2025 at 9:57 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Peter Eisentraut <peter@eisentraut.org> writes:
> On 20.10.25 22:43, Benjamin Leff wrote:
>> Are there any plans to support a client-only (no server) build in meson?

> I'm not aware of such plans.  But that doesn't mean somebody couldn't
> propose one.

Years ago we had support for client-only builds on at least some
toolchains (MSVC at least, not sure about elsewhere).  That got
dropped though.  I believe the prevailing opinion was that the amount
of time saved by not building all of PG didn't justify the maintenance
effort to keep the build scripts working for that case.  I think that
that argument hasn't lost its force, so we'd be likely to reject any
such proposal.

                        regards, tom lane

Re: Client-only Meson Build From Sources

От
Tom Lane
Дата:
Benjamin Leff <benjamin.w.leff@gmail.com> writes:
>> I believe the prevailing opinion was that the amount
>> of time saved by not building all of PG didn't justify the maintenance
>> effort to keep the build scripts working for that case

> IMO, it’s not just about time. For bare bones package managers when there’s
> no need to build the server, this saves a few GB.

It's still fundamentally about trading off machine resources versus
people time, though, and that tradeoff is not getting more attractive.

            regards, tom lane



Re: Client-only Meson Build From Sources

От
Andres Freund
Дата:
Hi,

On 2025-10-21 12:02:27 -0400, Tom Lane wrote:
> Benjamin Leff <benjamin.w.leff@gmail.com> writes:
> >> I believe the prevailing opinion was that the amount
> >> of time saved by not building all of PG didn't justify the maintenance
> >> effort to keep the build scripts working for that case
> 
> > IMO, it’s not just about time. For bare bones package managers when there’s
> > no need to build the server, this saves a few GB.
> 
> It's still fundamentally about trading off machine resources versus
> people time, though, and that tradeoff is not getting more attractive.

The impact really depends on what we define a client-only build as.

It'd not be hard at all to add a meta target that just builds a subset of the
tree. It'd be slightly harder, but still not that hard, to add a target to
install just a subset of libraries / binaries.

What would be a bit harder would be to add a configure-time switch to only
build client binaries. Mainly because, I think, it'd increase the test matrix
more than a dedicated build target would.

Benjamin, what precisely are you looking for with a client-only build?

Greetings,

Andres Freund