Re: [PATCHES] [pgsql-patches] Fixed shared_preload_libraries on Win32

2007-02-08 Thread Bruce Momjian

Patch applied.  Thanks.  I did not backpatch this to 8.2.X.  If I
should, let me know.

---


[EMAIL PROTECTED] wrote:
 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

[ Attachment, skipping... ]

 
 ---(end of broadcast)---
 TIP 5: don't forget to increase your free space map settings

-- 
  Bruce Momjian  [EMAIL PROTECTED]  http://momjian.us
  EnterpriseDB   http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [PATCHES] [pgsql-patches] Fixed shared_preload_libraries on Win32

2007-02-08 Thread korryd
 Patch applied.  Thanks.  I did not backpatch this to 8.2.X.  If I
 should, let me know.



Thanks Bruce - this bug will prevent plugins (like the PL/pgSQL debugger, 
profiler, and tracer) from working on Windows hosts, so I think it would be 
useful to backpatch to 8.2.


-- Korry



--
  Korry Douglas[EMAIL PROTECTED]
  EnterpriseDB  http://www.enterprisedb.com


Re: [PATCHES] [pgsql-patches] Fixed shared_preload_libraries on Win32

2007-02-01 Thread Bruce Momjian

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---


[EMAIL PROTECTED] wrote:
 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

[ Attachment, skipping... ]

 
 ---(end of broadcast)---
 TIP 5: don't forget to increase your free space map settings

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDBhttp://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


[pgsql-patches] Fixed shared_preload_libraries on Win32

2007-01-29 Thread korryd
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 -	1.515
--- src/backend/postmaster/postmaster.c	29 Jan 2007 20:02:06 -
***
*** 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 -	1.106
--- doc/src/sgml/config.sgml	29 Jan 2007 20:03:26 -
***
*** 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, varnameshared_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