Re: Static PostgreSQL Binaries (Linux + Windows)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zach van Rijn <me(at)zv(dot)io>
Cc: Pratik Parikh <pratik(dot)p(dot)parikh(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Static PostgreSQL Binaries (Linux + Windows)
Date: 2019-01-13 14:35:10
Message-ID: 3457.1547390110@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Zach van Rijn <me(at)zv(dot)io> writes:
> Under the hood, the only major "technique" is wrapping the 'gcc'
> command with flags such as '-static' to ensure that everything
> is built correctly, and using reliable toolchains [1].
> There is one minor issue in that the postgres build scripts no
> longer appear to support static building [2,3] so it'll attempt
> to build files such as 'POSIX.so' etc. and these cause errors.

Yup.

> The workaround is simply to ignore these errors during build
> until I or someone else can get around to supplying patches (in
> the next week or so; I have other commitments).

TBH, there's going to be zero community interest in such patches.
There is no reason to avoid shared libraries, and they're an
essential part of the modern Postgres build architecture ---
particularly our extensibility story.

Personally, I find your claim that purely-static linking is somehow
a security advantage to be quite bizarre. All modern Linux distros
actually forbid static linking, I believe, because it'd put them in
an impossible rebuild situation when some low-level component
requires an update --- possibly for security reasons. Are you going
to promise immediate updates anytime glibc gets patched, across all
the platforms you're proposing to support this on?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michel Pelletier 2019-01-13 17:00:55 Question about MemoryContextRegisterResetCallback
Previous Message Pratik Parikh 2019-01-13 14:15:03 Re: Static PostgreSQL Binaries (Linux + Windows)