[PATCH 3/8] Add support for a generic wal reading facility dubbed XLogReader - Mailing list pgsql-hackers

From Andres Freund
Subject [PATCH 3/8] Add support for a generic wal reading facility dubbed XLogReader
Date
Msg-id 1347669575-14371-3-git-send-email-andres@2ndquadrant.com
Whole thread Raw
In response to [RFC][PATCH] wal decoding, attempt #2  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: [PATCH 3/8] Add support for a generic wal reading facility dubbed XLogReader  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
Features:
- streaming reading/writing
- filtering
- reassembly of records

Reusing the ReadRecord infrastructure in situations where the code that wants
to do so is not tightly integrated into xlog.c is rather hard and would require
changes to rather integral parts of the recovery code which doesn't seem to be
a good idea.

Missing:
- "compressing" the stream when removing uninteresting records
- writing out correct CRCs
- separating reader/writer
---
 src/backend/access/transam/Makefile     |    2 +-
 src/backend/access/transam/xlogreader.c | 1032 +++++++++++++++++++++++++++++++
 src/include/access/xlogreader.h         |  264 ++++++++
 3 files changed, 1297 insertions(+), 1 deletion(-)
 create mode 100644 src/backend/access/transam/xlogreader.c
 create mode 100644 src/include/access/xlogreader.h


Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: [PATCH 7/8] Make InvalidateSystemCaches public
Next
From: Andres Freund
Date:
Subject: [PATCH 6/8] Log enough data into the wal to reconstruct logical changes from it if wal_level=logical