Re: rmgr hooks and contrib/rmgr_hook
ITAGAKI Takahiro <[email protected]> Mon, 01 Sep 2008 12:42:08 +0900
| Newsgroups | gmane.comp.db.postgresql.devel.patches |
|---|---|
| Message-ID | <[email protected]> |
Simon Riggs <[email protected]> wrote: > 1) A refactoring of calls to Rmgr code from xlog.c, and having isolated > the code for rmgrs then to allow rmgr plugins to modify and/or add rmgrs > to Postgres. Includes additional code to generate log messages so we can > see what is happening after plugin has executed. Why do we need to set rmgr_hook in _PG_init(), and add or mofify rmgrs in our hook functions? I think it is possible to modify RmgrTable directly in _PG_init() instead of to have rmgr_hook. If we can do so, the patch would be more simple, no? Am I missing something? Index: src/backend/access/transam/rmgr.c =================================================================== --- src/backend/access/transam/rmgr.c (head) +++ src/backend/access/transam/rmgr.c (new) @@ -25,1 +25,1 @@ -const RmgrData RmgrTable[RM_MAX_ID + 1] = { +RmgrData RmgrTable[MAX_NUM_RMGRS + 1] = { Regards, --- ITAGAKI Takahiro NTT Open Source Software Center -- Sent via pgsql-patches mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches