Re: rmgr hooks (v2) - Mailing list pgsql-hackers

From ITAGAKI Takahiro
Subject Re: rmgr hooks (v2)
Date
Msg-id 20081218142440.AB0D.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to rmgr hooks (v2)  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: rmgr hooks (v2)
List pgsql-hackers
Simon Riggs <simon@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




pgsql-hackers by date:

Previous
From: Emmanuel Cecchet
Date:
Subject: Re: Partitioning wiki page
Next
From: David Fetter
Date:
Subject: Re: Partitioning wiki page