Re: questions about porting postgresql to older operating system

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tim Kelly <gtkelly(at)dialectronics(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: questions about porting postgresql to older operating system
Date: 2021-01-14 18:34:51
Message-ID: dbfc1cfa-1c15-ec22-d138-ddd12b9af5b9@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 14/01/2021 20:18, Tom Lane wrote:
> Tim Kelly <gtkelly(at)dialectronics(dot)com> writes >> 3) Can postgresql still work without dynamic loading support?
>
> mmm ... in principle yes, but you'll lose one heck of a lot of
> functionality that's implemented in extension modules. Possibly
> that could be worked around by deciding which extensions you need
> and statically binding them into the backend executable. Again,
> that's not a case we've worried about for the last twenty years
> or so, so there's likely to be some pain there.

As it happens, I tried to build a completely static postgres binary
yesterday. I was debugging the failure on sparc64, and I found out about
user-space qemu, which can run binaries in binaries in a foreign
architecture directly without a virtual machine. However, it requires
that the binary is compiled statically. Cross-compiling a static
postgres binary was surprisingly easy on Debian, but when I tried to run
it, initdb failed because some library functions like getpweid() and
gethostaddr() didn't work when linked statically. The cross-compiler
warned about those, which was nice. I stubbed out a few of those library
functions, but eventually it failed on a call to dlopen(). That's where
I gave up.

It would be cool if that worked.

- Heikki

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2021-01-14 18:39:00 Re: BUG #16577: Segfault on altering a table located in a dropped tablespace
Previous Message Tom Lane 2021-01-14 18:18:43 Re: questions about porting postgresql to older operating system