Re: statically compiling postgres and problem with initdb

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: mona attariyan <mona_attarian(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: statically compiling postgres and problem with initdb
Date: 2011-07-01 15:48:39
Message-ID: 28687.1309535319@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Craig Ringer <craig(at)postnewspapers(dot)com(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Olivier LEVESQUE 2011-07-01 16:30:20 Re: pg_upgrade does not translate tablespace location to new cluster
Previous Message Craig Ringer 2011-07-01 15:03:18 Re: statically compiling postgres and problem with initdb