aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/xlogutils.h
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-11-06 13:52:08 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-11-06 13:55:36 +0200
commit2076db2aea766c4c828dccc34ae35f614129000d (patch)
tree5004b943d2014fdf3c2d4bed820fe550c5013c96 /src/include/access/xlogutils.h
parentd2b8a2c7ec1098e7b98160ccdc0e3a513964fb08 (diff)
downloadpostgresql-2076db2aea766c4c828dccc34ae35f614129000d.tar.gz
postgresql-2076db2aea766c4c828dccc34ae35f614129000d.zip
Move the backup-block logic from XLogInsert to a new file, xloginsert.c.
xlog.c is huge, this makes it a little bit smaller, which is nice. Functions related to putting together the WAL record are in xloginsert.c, and the lower level stuff for managing WAL buffers and such are in xlog.c. Also move the definition of XLogRecord to a separate header file. This causes churn in the #includes of all the files that write WAL records, and redo routines, but it avoids pulling in xlog.h into most places. Reviewed by Michael Paquier, Alvaro Herrera, Andres Freund and Amit Kapila.
Diffstat (limited to 'src/include/access/xlogutils.h')
-rw-r--r--src/include/access/xlogutils.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/include/access/xlogutils.h b/src/include/access/xlogutils.h
index ad579083ab8..8d906967232 100644
--- a/src/include/access/xlogutils.h
+++ b/src/include/access/xlogutils.h
@@ -11,7 +11,7 @@
#ifndef XLOG_UTILS_H
#define XLOG_UTILS_H
-#include "access/xlog.h"
+#include "access/xlogrecord.h"
#include "storage/bufmgr.h"
@@ -47,6 +47,12 @@ extern Buffer XLogReadBuffer(RelFileNode rnode, BlockNumber blkno, bool init);
extern Buffer XLogReadBufferExtended(RelFileNode rnode, ForkNumber forknum,
BlockNumber blkno, ReadBufferMode mode);
+extern Buffer RestoreBackupBlock(XLogRecPtr lsn, XLogRecord *record,
+ int block_index,
+ bool get_cleanup_lock, bool keep_buffer);
+extern Buffer RestoreBackupBlockContents(XLogRecPtr lsn, BkpBlock bkpb,
+ char *blk, bool get_cleanup_lock, bool keep_buffer);
+
extern Relation CreateFakeRelcacheEntry(RelFileNode rnode);
extern void FreeFakeRelcacheEntry(Relation fakerel);