Re: statically compiling postgres and problem with initdb - Mailing list pgsql-general

From Tom Lane
Subject Re: statically compiling postgres and problem with initdb
Date
Msg-id 28687.1309535319@sss.pgh.pa.us
Whole thread Raw
In response to Re: statically compiling postgres and problem with initdb  (Craig Ringer <craig@postnewspapers.com.au>)
Responses Re: statically compiling postgres and problem with initdb  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
Craig Ringer <craig@postnewspapers.com.au> writes:
> On 1/07/2011 5:11 PM, mona attariyan wrote:
>> I'm using Postgres to evaluate a research tool and the tool doesn't work
>> with dynamic libraries. That's why I need to compile it statically.

> For your purposes, you'll have to modify PostgreSQL to support being
> built statically.

It might be easier to rip out the functionality that expects loadable
libraries to work.  I think you could probably get through initdb if you
just disabled creation of encoding-conversion functions and text search
dictionaries (try #ifdef'ing out the relevant sections of initdb.c).

Of course, you'll end up with a pretty crippled version of PG --- no
encoding conversions, no text search, no procedural languages --- but
maybe that's enough for what you want to do.  If it's not, then as Craig
says, you're looking at some pretty major work to bind those pieces into
the executable statically.

            regards, tom lane

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: statically compiling postgres and problem with initdb
Next
From: Olivier LEVESQUE
Date:
Subject: Re: pg_upgrade does not translate tablespace location to new cluster