blob: 9a8c8890030ecd05b2ecc966db8c0476b15af3ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/*-------------------------------------------------------------------------
*
* storage_xlog.h
* prototypes for XLog support for backend/catalog/storage.c
*
*
* Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/catalog/storage_xlog.h
*
*-------------------------------------------------------------------------
*/
#ifndef STORAGE_XLOG_H
#define STORAGE_XLOG_H
#include "access/xlog.h"
#include "storage/block.h"
#include "storage/relfilenode.h"
/*
* Declarations for smgr-related XLOG records
*
* Note: we log file creation and truncation here, but logging of deletion
* actions is handled by xact.c, because it is part of transaction commit.
*/
/* XLOG gives us high 4 bits */
#define XLOG_SMGR_CREATE 0x10
#define XLOG_SMGR_TRUNCATE 0x20
typedef struct xl_smgr_create
{
RelFileNode rnode;
ForkNumber forkNum;
} xl_smgr_create;
typedef struct xl_smgr_truncate
{
BlockNumber blkno;
RelFileNode rnode;
} xl_smgr_truncate;
extern void log_smgrcreate(RelFileNode *rnode, ForkNumber forkNum);
extern void smgr_redo(XLogRecPtr lsn, XLogRecord *record);
extern void smgr_desc(StringInfo buf, uint8 xl_info, char *rec);
#endif /* STORAGE_XLOG_H */
|