Shared library support for postmaster - Mailing list pgsql-patches

From Erik Hofman
Subject Shared library support for postmaster
Date
Msg-id 3A76BB31.F60E1AA2@ehofman.com
Whole thread Raw
Responses Re: Shared library support for postmaster  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Hi,

After a little test i manneged to create a shared library for
postmaster.
Originally the postmaster program was 3922308 bytes large, but after a
small modification in src/backend/Makefile it have a postgres binary of
26812 bytes and one shared library of 3981064 bytes.

This should save 115 megabytes of memory when 32 postmaster processed
have started!!

Could anyone find a reason not to do it this way?

BTW. The modification is:

postgres: fmgr.h $(OBJS) $(VERSIONOBJ)
        $(CC) -all -shared $(LDFLAGS) -o libpgback.so $(OBJS) $(OBJS1)
$(VERSIONOBJ)
        $(CC) $(CFLAGS) -o postgres main/SUBSYS.o -L.  $(LDFLAGS)
-lpgback


instead of:

postgres: fmgr.h $(OBJS) $(VERSIONOBJ)
        $(CC) $(CFLAGS) -o postgres  $(OBJS) $(OBJS1) $(VERSIONOBJ)
$(LDFLAGS)

Erik

pgsql-patches by date:

Previous
From: Ryan Kirkpatrick
Date:
Subject: A Sparc/Linux patch (for 7.1), and a Linux rc.d/init.d script....
Next
From: Tom Lane
Date:
Subject: Re: Shared library support for postmaster