rmgr hooks and contrib/rmgr_hook

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: List pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: rmgr hooks and contrib/rmgr_hook
Date: 2008-08-31 09:27:47
Message-ID: 1220174867.4371.107.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers 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 Content-Type Size
rmgr_hook.tar application/x-tar 10.0 KB
rmgr_plugin.v4.patch text/x-patch 22.9 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-08-31 17:17:51 Cause of occasional buildfarm failures in sequence test
Previous Message Dean Rasheed 2008-08-31 09:04:45 Re: Auto-explain patch

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2008-08-31 09:52:52 WIP Join Removal
Previous Message David Rowley 2008-08-30 23:21:11 TODO item: Implement Boyer-Moore searching (First time hacker)