Skip site navigation (1) Skip section navigation (2)

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 (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-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 
 PostgreSQL Training, Services and Support

Attachment: rmgr_hook.tar
Description: application/x-tar (10.0 KB)
Attachment: rmgr_plugin.v4.patch
Description: text/x-patch (22.9 KB)


pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group