PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
generic_xlog.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * generic_xlog.h
4  * Generic xlog API definition.
5  *
6  *
7  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/access/generic_xlog.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef GENERIC_XLOG_H
15 #define GENERIC_XLOG_H
16 
17 #include "access/xlog.h"
18 #include "access/xlog_internal.h"
19 #include "access/xloginsert.h"
20 #include "storage/bufpage.h"
21 #include "utils/rel.h"
22 
23 #define MAX_GENERIC_XLOG_PAGES XLR_NORMAL_MAX_BLOCK_ID
24 
25 /* Flag bits for GenericXLogRegisterBuffer */
26 #define GENERIC_XLOG_FULL_IMAGE 0x0001 /* write full-page image */
27 
28 /* state of generic xlog record construction */
29 struct GenericXLogState;
31 
32 /* API for construction of generic xlog records */
35  int flags);
38 
39 /* functions defined for rmgr */
40 extern void generic_redo(XLogReaderState *record);
41 extern const char *generic_identify(uint8 info);
42 extern void generic_desc(StringInfo buf, XLogReaderState *record);
43 extern void generic_mask(char *pagedata, BlockNumber blkno);
44 
45 #endif /* GENERIC_XLOG_H */
Page GenericXLogRegisterBuffer(GenericXLogState *state, Buffer buffer, int flags)
Definition: generic_xlog.c:298
void GenericXLogAbort(GenericXLogState *state)
Definition: generic_xlog.c:447
const char * generic_identify(uint8 info)
Definition: genericdesc.c:55
XLogRecPtr GenericXLogFinish(GenericXLogState *state)
Definition: generic_xlog.c:336
unsigned char uint8
Definition: c.h:266
uint32 BlockNumber
Definition: block.h:31
void generic_mask(char *pagedata, BlockNumber blkno)
Definition: generic_xlog.c:542
GenericXLogState * GenericXLogStart(Relation relation)
Definition: generic_xlog.c:270
static char * buf
Definition: pg_test_fsync.c:66
uint64 XLogRecPtr
Definition: xlogdefs.h:21
Definition: regguts.h:298
WalTimeSample buffer[LAG_TRACKER_BUFFER_SIZE]
Definition: walsender.c:214
void generic_redo(XLogReaderState *record)
Definition: generic_xlog.c:481
int Buffer
Definition: buf.h:23
Pointer Page
Definition: bufpage.h:74
void generic_desc(StringInfo buf, XLogReaderState *record)
Definition: genericdesc.c:25