rmgr hooks and contrib/rmgr_hook - Mailing list pgsql-patches

From Simon Riggs
Subject rmgr hooks and contrib/rmgr_hook
Date
Msg-id 1220174867.4371.107.camel@ebony.2ndQuadrant
Whole thread Raw
Responses Re: rmgr hooks and contrib/rmgr_hook
List pgsql-patches
As previously discussed on -hackers on Aug 19, "Proposed Resource
Manager Changes".

Enclosed are two closely related items:

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.

Introduces a shared memory area for Rmgrs that allows each backend to
read which RmgrIds are valid for the currently running server, allowing
call to be made during XLogInsert() to validate rmgrid. (The validation
uses a fixed length BitMapSet, a minor new invention for this patch, but
that is begging to be refactored - I await advice and/or comments on the
fastest way to do this if that isn't it.)

(I'd like to rip out WAL_DEBUG completely in favour of this new
mechanism, but I haven't done that here).

2) contrib module that contains an example rmgr_hook - actually two
examples in one module

These have both been tested in normal mode, WAL_DEBUG mode and in warm
standby recovery, so not a WIP progress patch.

--
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support

Attachment

pgsql-patches by date:

Previous
From: "Brendan Jurd"
Date:
Subject: to_date() validation
Next
From: Simon Riggs
Date:
Subject: WIP Join Removal