This patch fixes shared_preload_libraries on Windows hosts. It forces ach backend to re-load all shared_preload_libraries.
(see http://archives.postgresql.org/pgsql-hackers/2007-01/msg01498.php for discussion) -- Korry -- Korry Douglas [EMAIL PROTECTED] EnterpriseDB http://www.enterprisedb.com
Index: src/backend/postmaster/postmaster.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/postmaster/postmaster.c,v retrieving revision 1.515 diff -c -r1.515 postmaster.c *** src/backend/postmaster/postmaster.c 28 Jan 2007 06:32:03 -0000 1.515 --- src/backend/postmaster/postmaster.c 29 Jan 2007 20:02:06 -0000 *************** *** 3359,3364 **** --- 3359,3373 ---- #endif /* + * process any libraries that should be preloaded at postmaster start + * + * NOTE: we have to re-load the shared_preload_libraries here because + * this backend is not fork()ed so we can't inherit any shared + * libraries / DLL's from our parent (the postmaster). + */ + process_shared_preload_libraries(); + + /* * Perform additional initialization and client authentication. * * We want to do this before InitProcess() for a couple of reasons: 1. Index: doc/src/sgml/config.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/config.sgml,v retrieving revision 1.106 diff -c -r1.106 config.sgml *** doc/src/sgml/config.sgml 25 Jan 2007 11:53:50 -0000 1.106 --- doc/src/sgml/config.sgml 29 Jan 2007 20:03:26 -0000 *************** *** 990,995 **** --- 990,1006 ---- libraries that will be used in most sessions. </para> + <note> + <para> + On Windows hosts, preloading a library at server start will not reduce + the time required to start each new server process; each server process + will re-load all preload libraries. However, <varname>shared_preload_libraries + </varname> is still useful on Windows hosts because some shared libraries may + need to perform certain operations that only take place at postmaster start + (for example, a shared library may need to reserve lightweight locks + or shared memory and you can't do that after the postmaster has started). + </para> + </note> <para> If a specified library is not found, the server will fail to start.
---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings