Simon Riggs <si...@2ndquadrant.com> wrote:

> Latest version of rmgr hooks patch for later review in current
> commitfest.
> (Minor update to CVS HEAD).

It doesn't work on Window (EXEC_BACKEND platform) because
shared_preload_libraries are not loaded in startup process.
So, there are no timing to initialize rmgr_hook.

I have the same problem in contrib/pg_stat_statements.
The both patches requires the following modifications.

diff -cprN HEAD/src/backend/storage/lmgr/proc.c 
pg_stat_statements/src/backend/storage/lmgr/proc.c
*** HEAD/src/backend/storage/lmgr/proc.c        Mon Nov  3 06:24:52 2008
--- pg_stat_statements/src/backend/storage/lmgr/proc.c  Tue Dec  2 16:57:33 2008
*************** InitAuxiliaryProcess(void)
*** 381,386 ****
--- 381,390 ----
        if (MyProc != NULL)
                elog(ERROR, "you already exist");
  
+ #ifdef EXEC_BACKEND
+       process_shared_preload_libraries();
+ #endif
+ 
        /*
         * We use the ProcStructLock to protect assignment and releasing of
         * AuxiliaryProcs entries.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to