Skip site navigation (1) Skip section navigation (2)

Re: Use of zlib

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Thomas Hallgren <thhal(at)mailblocks(dot)com>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: Use of zlib
Date: 2004-09-26 00:58:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
I am confused.  I just checked my backend binary and I don't see any
unusual libs required:

	$ ldd postgres => /usr/lib/ (0x2833f000) => /shlib/ (0x2834e000) => /shlib/ (0x2838c000) => /shlib/ (0x2838f000) => /shlib/ (0x283a0000) => /shlib/ (0x283ac000)

The libncurses is a little unusual but I don't see libreadline in there
even though it is on the link line.

Are some OS's adding libs that aren't required by the binary?


Andrew Dunstan wrote:
> Thomas Hallgren wrote:
> > Problem:
> > PL/Java use a JVM. On some platforms and with some JVM's (Sun's in 
> > particular) a is bundled that contains a 1.1.3 version of 
> > functions also provided in zlib (why they do this is beyond me, but 
> > they do so I'll have to live with it). PostgreSQL is linked with zlib 
> > by default. This resuls in a conflict which resuls in a JVM crash.
> >
> > I can circumvein this crash by using LD_PRELOAD to force a load of the 
> > JVM bundled but I suspect that might result in a crash as 
> > soon as PostgreSQL calls on zlib to do something. It's of course 
> > possible to configure postgresql with --without-zlib also provided you 
> > have accesst o the source.
> >
> > Question:
> > From what I can understand from the documentation, the only utility in 
> > PostgreSQL that actually uses zlib is pg_dump? If so, why is the 
> > postgres process linked with -lz?
> >
> >
> I did a small experiment by installing binutils 2.15 and adding 
> -Wl,--as-needed to the LDFLAGS, as Tom had suggested might be useful.
> This seemed to work quite well and trimmed back the needed libs quite a 
> bit. However, when you configure --with-openssl, libz is again linked in.
> Not sure where that leaves us.
> cheers
> andrew
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2004-09-26 02:25:47
Subject: Re: Make configure use krb5-config
Previous:From: Tom LaneDate: 2004-09-26 00:29:41
Subject: Re: 7.4.5 losing committed transactions

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group