Re: Examining the output of: ldd `which postgres`

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Sean Chittenden <sean(at)chittenden(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Examining the output of: ldd `which postgres`
Date: 2003-09-05 22:17:07
Message-ID: 200309052217.h85MH8I27263@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sean Chittenden wrote:
> > We add those to all links, mostly because it is too confusing to do
> > it per link. It doesn't hurt anything because it is dynamically
> > linked, so doesn't take any disk space, and in fact is never called.
>
> My concern wasn't for disk space, but for symbol resolution times and
> unnecessary VM page table space. Does the backend fork() or exec() a
> copy of itself when a new connection comes in? I thought it was
> exec() for some reason. Anyway, given how easy it is to change the
> LDFLAGS, I was thinking about chasing down where postgres is linked
> and splitting apart LDFLAGS into two sets of LDFLAGS: LDFLAGS_CLI and
> LDFLAGS (or LDFLAGS_DAEMON, or some such). It's chump, but a few ms
> here and there, or a little more IO there eventually add up,
> especially in the arena of on connection times.

Backend only forks(). I think you would be better off using Makefile
macros to _remove_ those two libraries.

I see this:

$(filter crypt.o getaddrinfo.o inet_aton.o snprintf.o strerror.o path.o thread.o, $(LIBOBJS))

Seems you need the reverse.

--
Bruce Momjian | http://candle.pha.pa.us
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sean Chittenden 2003-09-05 22:28:50 Re: Examining the output of: ldd `which postgres`
Previous Message Manfred Spraul 2003-09-05 22:16:15 Re: [osdldbt-general] Re: Prelimiary DBT-2 Test results